login
A061288
Integer part of square root of n-th triangular number.
6
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,3
LINKS
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
EXAMPLE
a(10) = 7, the 10th triangular number is 55 and floor(sqrt(55)) = floor(7.4161) = 7.
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 *)
PROG
(PARI) {a(n) = sqrtint(n * (n+1) \ 2)}; /* Michael Somos, Aug 19 2018 */
CROSSREFS
Sequence in context: A368908 A100618 A248227 * A086525 A248231 A120503
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, Apr 25 2001
EXTENSIONS
Corrected and extended by Larry Reeves (larryr(AT)acm.org), May 07 2001
STATUS
approved