

A061266


Number of squares between n^3 and (n+1)^3.


1



1, 3, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 6, 6, 5, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 8, 9, 9, 8, 9, 9, 9, 9, 10, 10, 9, 10, 10, 10, 11, 10, 10, 10, 11, 10, 11, 11, 11, 12, 11, 11, 12, 11, 12, 12, 12, 11, 12, 12, 12, 12, 13, 12, 13, 12, 13, 13, 13, 13, 13, 13, 14, 13, 13, 13, 14
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


LINKS



FORMULA

a(n) = 3 if n=2; floor(sqrt((n+1)^3  1))  floor(sqrt(n^3+1)) otherwise.  Ralf Stephan, Mar 28 2003 [Corrected by Sean A. Irvine, Jan 29 2023]


EXAMPLE

a(2) = 3 as there are three squares (9, 16 and 25) between 8 and 27.
a(3)= 2 as there are two squares (36 and 49) between 27 and 64. (64 is not counted, as it is not strictly between 27 and 64.)


MATHEMATICA

a[1] = 1; a[2] = 3; a[n_] := Floor[Sqrt[(n+1)^31]]  Floor[Sqrt[n^3+1]]; Array[a, 100] (* JeanFrançois Alcover, Dec 04 2015, adapted from PARI *)


PROG

(PARI) print1("1, 3, "):for(n=3, 100, print1(sqrtint((n+1)^31)sqrtint(n^3+1)", "))
(PARI) { for (n=1, 2000, a=sqrtint((n+1)^31)sqrtint(n^3+1); if (n==2, a=3); write("b061266.txt", n, " ", a); ) } \\ Harry J. Smith, Jul 20 2009


CROSSREFS



KEYWORD

nonn


AUTHOR



EXTENSIONS



STATUS

approved



