The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A108161 Partial sums of the positive integers n according to the rule: if n is square then add sqrt(n) else add n. 0
0, 1, 3, 6, 8, 13, 19, 26, 34, 37, 47, 58, 70, 83, 97, 112, 116, 133, 151, 170, 190, 211, 233, 256, 280, 285, 311, 338, 366, 395, 425, 456, 488, 521, 555, 590, 596, 633, 671, 710, 750, 791, 833, 876, 920, 965, 1011, 1058, 1106, 1113, 1163, 1214, 1266, 1319 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
EXAMPLE
0+1=1, 1+2=3, 3+3=6, 6+sqrt(4) = 8, ...
MATHEMATICA
Accumulate[Table[If[IntegerQ[Sqrt[n]], Sqrt[n], n], {n, 0, 53}]] (* James C. McMahon, Feb 22 2024 *)
PROG
(PARI) lista(nn) = s=0; for(x=0, nn, if(issquare(x), s+=sqrtint(x), s+=x); print1(s, ", ")) \\ Michel Marcus, Jul 02 2017
CROSSREFS
Sequence in context: A073355 A067440 A346597 * A263349 A352319 A297211
KEYWORD
easy,nonn
AUTHOR
Cino Hilliard, Jun 13 2005
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 7 18:23 EDT 2024. Contains 373206 sequences. (Running on oeis4.)