A061288 Integer part of square root of n-th triangular number.
1, 1, 2, 3, 3, 4, 5, 6, 6, 7, 8, 8, 9, 10, 10, 11, 12, 13, 13, 14, 15, 15, 16, 17, 18, 18, 19, 20, 20, 21, 22, 22, 23, 24, 25, 25, 26, 27, 27, 28, 29, 30, 30, 31, 32, 32, 33, 34, 35, 35, 36, 37, 37, 38, 39, 39, 40, 41, 42, 42, 43, 44, 44, 45, 46, 47, 47, 48, 49, 49, 50, 51, 51
Offset: 1
Examples
a(10) = 7, the 10th triangular number is 55 and floor(sqrt(55)) = floor(7.4161) = 7.
Links
- Winston de Greef, Table of n, a(n) for n = 1..10000
Programs
-
Maple
for n from 1 to 150 do printf("%d,",floor(sqrt(n*(n+1)/2))) od;
-
Mathematica
Table[Floor[Sqrt[n*(n + 1)/2]], {n, 100}] (* Zak Seidov, May 25 2015 *) IntegerPart[Sqrt[#]]&/@Accumulate[Range[80]] (* Harvey P. Dale, May 13 2018 *)
-
PARI
{a(n) = sqrtint(n * (n+1) \ 2)}; /* Michael Somos, Aug 19 2018 */
Formula
a(n) = floor(sqrt(n*(n+1)/2)). - Zak Seidov, May 25 2015
a(n) = a(-1-n) = A186221(n) - n for all n in Z. - Michael Somos, Aug 19 2018
Extensions
Corrected and extended by Larry Reeves (larryr(AT)acm.org), May 07 2001