|
Search: id:A108167
|
|
|
| A108167 |
|
Partial sums of the positive integers n according to the rule: if n is square then subtract sqrt(n) else add n. |
|
+0 1
|
|
| 0, -1, 1, 4, 2, 7, 13, 20, 28, 25, 35, 46, 58, 71, 85, 100, 96, 113, 131, 150, 170, 191, 213, 236, 260, 255, 281, 308, 336, 365, 395, 426, 458, 491, 525, 560, 554, 591, 629, 668, 708, 749, 791, 834, 878, 923, 969, 1016, 1064, 1057, 1107, 1158, 1210, 1263, 1317, 1372, 1428, 1485, 1543, 1602, 1662, 1723, 1785, 1848
(list; graph; listen)
|
|
|
OFFSET
|
0,4
|
|
|
EXAMPLE
|
0-1=-1,-1+2=1,1+3=4,4-sqrt(4) = 2
|
|
PROGRAM
|
(PARI) g(n) = s=0; for(x=0, n, if(issquare(x), s-=sqrt(x), s+=x); print1(floor(s)", "))
|
|
CROSSREFS
|
Sequence in context: A120871 A019689 A072009 this_sequence A050105 A128333 A019953
Adjacent sequences: A108164 A108165 A108166 this_sequence A108168 A108169 A108170
|
|
KEYWORD
|
easy,sign
|
|
AUTHOR
|
Cino Hilliard (hillcino368(AT)gmail.com), Jun 13 2005
|
|
|
Search completed in 0.002 seconds
|