# triangular number counting function

For a given nonnegative number $x$, the triangular number counting function counts how many triangular numbers^{} are not greater than $x$. The formula is simple:

$$\lfloor \frac{-1+\sqrt{8x+1}}{2}\rfloor ,$$ |

in sharp contrast to the lack of a formula for the prime counting function $\pi (x)$. If one accepts 0 as a triangular number, the formula easily accommodates this by the mere addition of 1 after flooring the fraction.

## References

- 1 Zhi-Wei Sun, “On Sums of Primes and Triangular Numbers” ArXiv preprint, 10 April (2008): 1

Title | triangular number counting function |
---|---|

Canonical name | TriangularNumberCountingFunction |

Date of creation | 2013-03-22 18:03:03 |

Last modified on | 2013-03-22 18:03:03 |

Owner | PrimeFan (13766) |

Last modified by | PrimeFan (13766) |

Numerical id | 5 |

Author | PrimeFan (13766) |

Entry type | Definition |

Classification | msc 11A25 |