|
|
A000037
|
|
Numbers that are not squares (or, the nonsquares).
(Formerly M0613 N0223)
|
|
167
|
|
|
2, 3, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Note the remarkable formula for the n-th term (see the FORMULA section)!
These are the natural numbers with an even number of divisors. The number of divisors is odd for the complementary sequence, the squares (sequence A000290) and the numbers for which the number of divisors is divisible by 3 is sequence A059269. - Ola Veshta (olaveshta(AT)my-deja.com), Apr 04 2001
a(n) is the largest integer m not equal to n such that n = (floor(n^2/m) + m)/2. - Alexander R. Povolotsky, Feb 10 2008
If a(n) and a(n+1) are of the same parity then (a(n)+a(n+1))/2 is a square. - Zak Seidov, Aug 13 2012
Theaetetus of Athens proved the irrationality of the square roots of these numbers in the 4th century BC. - Charles R Greathouse IV, Apr 18 2013
4*a(n) are the even members of A079896, the discriminants of indefinite binary quadratic forms. - Wolfdieter Lang, Jun 14 2013
|
|
REFERENCES
|
Titu Andreescu, Dorin Andrica, and Zuming Feng, 104 Number Theory Problems, Birkhäuser, 2006, 58-60.
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
|
|
FORMULA
|
a(n) = n + floor(1/2 + sqrt(n)).
a(n) = n + floor(sqrt( n + floor(sqrt n))).
|
|
EXAMPLE
|
For example note that the squares 0, 1, 4, 9, 16 are not included.
|
|
MAPLE
|
A000037 := n->n+floor(1/2+sqrt(n));
|
|
MATHEMATICA
|
a[n_] := (n + Floor[Sqrt[n + Floor[Sqrt[n]]]]); Table[a[n], {n, 71}] (* Robert G. Wilson v, Sep 24 2004 *)
With[{upto=100}, Complement[Range[upto], Range[Floor[Sqrt[upto]]]^2]] (* Harvey P. Dale, Dec 02 2011 *)
a[ n_] := If[ n < 0, 0, n + Round @ Sqrt @ n]; (* Michael Somos, May 28 2014 *)
|
|
PROG
|
(Magma) [n : n in [1..1000] | not IsSquare(n) ];
(Magma) at:=0; for n in [1..10000] do if not IsSquare(n) then at:=at+1; print at, n; end if; end for;
(PARI) {a(n) = if( n<0, 0, n + (1 + sqrtint(4*n)) \ 2)};
(Haskell)
a000037 n = n + a000196 (n + a000196 n)
(Python)
from math import isqrt
(Python)
from math import isqrt
|
|
CROSSREFS
|
|
|
KEYWORD
|
easy,nonn,nice
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|