login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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)^3-1]] - Floor[Sqrt[n^3+1]]; Array[a, 100] (* Jean-François Alcover, Dec 04 2015, adapted from PARI *)
PROG
(PARI) print1("1, 3, "):for(n=3, 100, print1(sqrtint((n+1)^3-1)-sqrtint(n^3+1)", "))
(PARI) { for (n=1, 2000, a=sqrtint((n+1)^3-1)-sqrtint(n^3+1); if (n==2, a=3); write("b061266.txt", n, " ", a); ) } \\ Harry J. Smith, Jul 20 2009
CROSSREFS
Sequence in context: A292511 A238872 A260195 * A345755 A111114 A242409
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 24 2001
EXTENSIONS
More terms from Ralf Stephan, Mar 28 2003
Offset changed from 0 to 1 by Harry J. Smith, Jul 20 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)