|
|
A049240
|
|
Smallest nonnegative value taken on by x^2 - n*y^2 for an infinite number of integer pairs (x, y).
|
|
13
|
|
|
0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Encodes to 1,2,1,4,1,6,1,8,1,10,...: unsigned version of A009531. - Paul Barry, Oct 12 2005
Parity of inverse Moebius transform of Jacobsthal numbers J(k) less J(n). - Paul Barry, Oct 12 2005
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 0 if n is square, 1 otherwise.
a(n) = floor(1+ceiling(sqrt(n))-floor(sqrt((n)))/2). - Wesley Ivan Hurt, Sep 27 2014
G.f.: (1+x)/(2-2*x) - (1/2)*theta_3(0,x) where theta_3 is a Jacobi theta function. - Robert Israel, Oct 02 2014
|
|
MAPLE
|
|
|
MATHEMATICA
|
Table[Floor[(1 + Ceiling[Sqrt[n]] - Floor[Sqrt[n]])/2], {n, 70}] (* Wesley Ivan Hurt, Sep 27 2014 *)
|
|
PROG
|
(Magma) [Floor((1 + Ceiling(Sqrt(n)) - Floor(Sqrt(n)))/2) : n in [1..100]]; // Wesley Ivan Hurt, Sep 27 2014
(Python)
from math import isqrt
|
|
CROSSREFS
|
Characteristic function of A000037 (the nonsquares).
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|