login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A339363
a(n) = Sum_{k=1..floor(sqrt(n))} floor(sqrt(n-k)).
0
0, 1, 1, 2, 3, 4, 4, 4, 6, 7, 8, 9, 9, 9, 9, 12, 13, 14, 15, 16, 16, 16, 16, 16, 20, 21, 22, 23, 24, 25, 25, 25, 25, 25, 25, 30, 31, 32, 33, 34, 35, 36, 36, 36, 36, 36, 36, 36, 42, 43, 44, 45, 46, 47, 48, 49, 49, 49, 49, 49, 49, 49, 49, 56, 57, 58, 59, 60, 61, 62, 63, 64, 64, 64
OFFSET
1,4
COMMENTS
Contains all nonnegative integers not in A189151.
MATHEMATICA
Table[Sum[Floor[Sqrt[n - k]], {k, Floor[Sqrt[n]]}], {n, 80}]
PROG
(PARI) a(n) = sum(k=1, sqrtint(n), sqrtint(n-k)); \\ Michel Marcus, Apr 24 2021
(Python)
from math import isqrt
def a(n): return sum(isqrt(n-k) for k in range(1, isqrt(n)+1))
print([a(n) for n in range(1, 75)]) # Michael S. Branicky, Apr 24 2021
CROSSREFS
Cf. A189151.
Sequence in context: A221917 A131798 A206925 * A377910 A114212 A344351
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Apr 24 2021
STATUS
approved