login
A349662
a(n) is the number of squares strictly between n^2 and n^3.
2
0, 0, 0, 2, 3, 6, 8, 11, 14, 17, 21, 25, 29, 33, 38, 43, 47, 53, 58, 63, 69, 75, 81, 87, 93, 99, 106, 113, 120, 127, 134, 141, 149, 156, 164, 172, 179, 188, 196, 204, 212, 221, 230, 238, 247, 256, 265, 275, 284, 293, 303, 313, 322, 332, 342, 352, 363, 373, 383
OFFSET
0,4
COMMENTS
"Strictly between" in the name means n^2 and n^3 are excluded.
If n^2 and n^3 are included we get A349993.
LINKS
FORMULA
a(n) = floor(n^(3/2)) - n - [n>1 and A010052(n)=1]. - Giorgos Kalogeropoulos, Dec 08 2021
For n > 1, a(n) = floor(sqrt(n^3-1)) - n. - Chai Wah Wu, Dec 08 2021
MATHEMATICA
Join[{0, 0}, Table[Floor[s=n^(3/2)]-n-Boole@IntegerQ@s, {n, 2, 100}]] (* Giorgos Kalogeropoulos, Dec 08 2021 *)
PROG
(PARI) for(n=0, 58, my(n2=n^2+1, n3=n^3-1); print1(sum(k=n2, n3, issquare(k)), ", "))
(Python)
def a(n):
counter = 1
while (n+counter)**2 < n**3:
counter += 1
return (counter-1)
print([a(n) for n in range(0, 10001)])
(Python)
from math import isqrt
def A349662(n): return 0 if n <= 1 else isqrt(n**3-1) - n # Chai Wah Wu, Dec 08 2021
CROSSREFS
Cf. A028387 (number of squares between (n+2)^2 and (n+2)^4).
Cf. A349993 (n^2 and n^3 included).
Sequence in context: A097383 A072893 A378162 * A371002 A127758 A185599
KEYWORD
nonn
AUTHOR
Karl-Heinz Hofmann, Dec 07 2021
STATUS
approved