OFFSET
1,3
LINKS
Winston de Greef, Table of n, a(n) for n = 1..10000
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
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