OFFSET
0,4
COMMENTS
Interval with n^2 and n^3 excluded is A349662.
LINKS
Karl-Heinz Hofmann, Table of n, a(n) for n = 0..10000
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
KEYWORD
nonn,easy
AUTHOR
Karl-Heinz Hofmann and Hugo Pfoertner, Dec 08 2021
STATUS
approved