login
a(n) is the number of squares strictly between n^2 and n^3.
2

%I #36 Dec 02 2022 14:54:17

%S 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,

%T 99,106,113,120,127,134,141,149,156,164,172,179,188,196,204,212,221,

%U 230,238,247,256,265,275,284,293,303,313,322,332,342,352,363,373,383

%N a(n) is the number of squares strictly between n^2 and n^3.

%C "Strictly between" in the name means n^2 and n^3 are excluded.

%C If n^2 and n^3 are included we get A349993.

%H Karl-Heinz Hofmann, <a href="/A349662/b349662.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = floor(n^(3/2)) - n - [n>1 and A010052(n)=1]. - _Giorgos Kalogeropoulos_, Dec 08 2021

%F For n > 1, a(n) = floor(sqrt(n^3-1)) - n. - _Chai Wah Wu_, Dec 08 2021

%t Join[{0,0},Table[Floor[s=n^(3/2)]-n-Boole@IntegerQ@s,{n,2,100}]] (* _Giorgos Kalogeropoulos_, Dec 08 2021 *)

%o (PARI) for(n=0, 58, my(n2=n^2+1, n3=n^3-1); print1(sum(k=n2, n3, issquare(k)), ", "))

%o (Python)

%o def a(n):

%o counter = 1

%o while (n+counter)**2 < n**3:

%o counter += 1

%o return (counter-1)

%o print([a(n) for n in range(0,10001)])

%o (Python)

%o from math import isqrt

%o def A349662(n): return 0 if n <= 1 else isqrt(n**3-1) - n # _Chai Wah Wu_, Dec 08 2021

%Y Cf. A000290, A000578, A010052.

%Y Cf. A028387 (number of squares between (n+2)^2 and (n+2)^4).

%Y Cf. A349993 (n^2 and n^3 included).

%K nonn

%O 0,4

%A _Karl-Heinz Hofmann_, Dec 07 2021