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”).

A349993
a(n) is the number of squares k^2 with n^2 <= k^2 <= n^3.
2
1, 1, 1, 3, 5, 7, 9, 12, 15, 19, 22, 26, 30, 34, 39, 44, 49, 54, 59, 64, 70, 76, 82, 88, 94, 101, 107, 114, 121, 128, 135, 142, 150, 157, 165, 173, 181, 189, 197, 205, 213, 222, 231, 239, 248, 257, 266, 276, 285, 295, 304, 314, 323, 333, 343, 353, 364, 374, 384, 395, 405
OFFSET
0,4
COMMENTS
Interval with n^2 and n^3 excluded is A349662.
LINKS
FORMULA
a(n) = floor(sqrt(n^3)) - n + 1. - Giorgos Kalogeropoulos, Dec 08 2021
MATHEMATICA
Table[Floor[Sqrt[n^3]]-n+1, {n, 0, 100}] (* Giorgos Kalogeropoulos, Dec 08 2021 *)
PROG
(PARI) a(n) = sqrtint(n^3) - n + 1
(PARI) a(n)=sum(k=n^2, n^3, issquare(k))
(PARI) for(n=0, 60, my(n2=n^2, n3=n^3); print1(sum(k=n2, n3, issquare(k)), ", "))
(Python)
def a(n):
counter = 0
while (n+counter)**2 <= n**3: counter += 1
return (counter)
print([a(n) for n in range(0, 60)])
(Python)
from math import isqrt
def A349993(n): return isqrt(n**3) - n + 1 # Chai Wah Wu, Dec 08 2021
CROSSREFS
Cf. A349662 (number of squares k^2 with n^2 < k^2 < n^3).
Cf. A028387 (Also the number of squares between (n+2)^2 and (n+2)^4).
Sequence in context: A080751 A025218 A258782 * A007078 A226332 A226331
KEYWORD
nonn,easy
AUTHOR
STATUS
approved