|
|
A051623
|
|
a(n) = Sum_{x=1+floor(sqrt(n))..floor(sqrt(2n))} (x^2 - n).
|
|
1
|
|
|
0, 2, 1, 0, 4, 3, 2, 9, 7, 6, 5, 4, 15, 13, 11, 9, 8, 25, 23, 21, 19, 17, 15, 13, 35, 33, 31, 29, 27, 25, 23, 53, 50, 47, 44, 41, 39, 37, 35, 33, 71, 68, 65, 62, 59, 56, 53, 50, 47, 95, 92, 89, 86, 83, 80, 77, 74, 71, 68, 65, 122, 118, 114, 110, 107, 104, 101, 98, 95, 92, 89, 158, 154, 150
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
a(13)=15 because floor(sqrt(13))=3, floor(sqrt(2*13))=5 and (4*4 - 13) + (5*5 - 13) = 15.
|
|
MATHEMATICA
|
Table[Sum[k^2 - n , {k, 1 + Floor[Sqrt[n]], Floor[Sqrt[2*n]]}], {n, 1, 100}] (* G. C. Greubel, Aug 15 2018 *)
|
|
PROG
|
(PARI) for(n=1, 100, print1(sum(k=1+floor(sqrt(n)), floor(sqrt(2*n)), k^2 -n), ", ")) \\ G. C. Greubel, Aug 15 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn
|
|
AUTHOR
|
Joe K. Crump (joecr(AT)carolina.rr.com)
|
|
EXTENSIONS
|
Data corrected and terms a(64) onward added by G. C. Greubel, Aug 15 2018
|
|
STATUS
|
approved
|
|
|
|