|
|
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
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|