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”).
%I #28 Mar 20 2022 06:36:16
%S 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,
%T 101,107,114,121,128,135,142,150,157,165,173,181,189,197,205,213,222,
%U 231,239,248,257,266,276,285,295,304,314,323,333,343,353,364,374,384,395,405
%N a(n) is the number of squares k^2 with n^2 <= k^2 <= n^3.
%C Interval with n^2 and n^3 excluded is A349662.
%H Karl-Heinz Hofmann, <a href="/A349993/b349993.txt">Table of n, a(n) for n = 0..10000</a>
%F a(n) = floor(sqrt(n^3)) - n + 1. - _Giorgos Kalogeropoulos_, Dec 08 2021
%t Table[Floor[Sqrt[n^3]]-n+1,{n,0,100}] (* _Giorgos Kalogeropoulos_, Dec 08 2021 *)
%o (PARI) a(n) = sqrtint(n^3) - n + 1
%o (PARI) a(n)=sum(k=n^2,n^3,issquare(k))
%o (PARI) for(n=0,60,my(n2=n^2,n3=n^3);print1(sum(k=n2,n3,issquare(k)),", "))
%o (Python)
%o def a(n):
%o counter = 0
%o while (n+counter)**2 <= n**3: counter += 1
%o return (counter)
%o print([a(n) for n in range(0,60)])
%o (Python)
%o from math import isqrt
%o def A349993(n): return isqrt(n**3) - n + 1 # _Chai Wah Wu_, Dec 08 2021
%Y Cf. A000290, A000578.
%Y Cf. A349662 (number of squares k^2 with n^2 < k^2 < n^3).
%Y Cf. A028387 (Also the number of squares between (n+2)^2 and (n+2)^4).
%K nonn,easy
%O 0,4
%A _Karl-Heinz Hofmann_ and _Hugo Pfoertner_, Dec 08 2021