|
|
A000035
|
|
Period 2: (0, 1) repeated; a(n) = n mod 2; parity of n.
(Formerly M0001)
|
|
244
|
|
|
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Least significant bit of n, lsb(n).
Also decimal expansion of 1/99.
Also the binary expansion of 1/3. - Robert G. Wilson v, Sep 01 2015
a(n) = ABS(A134451(n)). - Reinhard Zumkeller, Oct 27 2007
Characteristic function of odd numbers: a(A005408(n)) = 1, a(A005843(n)) = 0. - Reinhard Zumkeller, Sep 29 2008
A102370(n) modulo 2. - Philippe Deléham, Apr 04 2009
Base b expansion of 1/(b^2-1) for any b >= 2 is 0.0101... (A005563 has b^2-1). - Rick L. Shepherd, Sep 27 2009
Let A be the Hessenberg n X n matrix defined by: A[1,j] = j mod 2, A[i,i] := 1, A[i,i-1] = -1, and A[i,j] = 0 otherwise. Then, for n >= 1, a(n) = (-1)^n*charpoly(A,1). - Milan Janjic, Jan 24 2010
From R. J. Mathar, Jul 15 2010: (Start)
The sequence is the principal Dirichlet character of the reduced residue system mod 2 or mod 4 or mod 8 or mod 16...
Associated Dirichlet L-functions are for example L(2,chi) = sum_{n>=1} a(n)/n^2 == A111003,
or L(3,chi) = sum_{n>=1} a(n)/n^3 = 1.05179979... = 7*A002117/8,
or L(4,chi) = sum_{n>=1} a(n)/n^4 = 1.014678... = A092425/96. (End)
Also parity of the nonnegative integers A001477. - Omar E. Pol, Jan 17 2012
a(n) = (4/n), where (k/n) is the Kronecker symbol. See the Eric Weisstein link. - Wolfdieter Lang, May 28 2013
|
|
REFERENCES
|
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
David Wasserman, Table of n, a(n) for n = 0..1000
Paul Barry, A Catalan Transform and Related Transformations on Integer Sequences, Journal of Integer Sequences, Vol. 8 (2005), Article 05.4.5.
Y. Puri and T. Ward, Arithmetic and growth of periodic orbits, J. Integer Seqs., Vol. 4 (2001), #01.2.1.
Eric Weisstein's World of Mathematics, Dirichlet Series Generating Function
Eric Weisstein's World of Mathematics, Kronecker Symbol
A. K. Whitford, Binet's Formula Generalized, Fibonacci Quarterly, Vol. 15, No. 1, 1979, pp. 21, 24, 29
Index entries for "core" sequences
Index entries for characteristic functions
Index entries for linear recurrences with constant coefficients, signature (0,1).
|
|
FORMULA
|
a(n) = (1 - (-1)^n)/2.
a(n) = n mod 2.
a(n) = 1 - a(n-1).
Multiplicative with a(p^e) = p%2. - David W. Wilson, Aug 01 2001
G.f.: x/(1-x^2). E.g.f.: sinh(x). - Paul Barry, Mar 11 2003
a(n) = (A000051(n) - A014551(n))/2. - Mario Catalani (mario.catalani(AT)unito.it), Aug 30 2003
a(n) = ceil((-2)^(-n-1)). - Reinhard Zumkeller, Apr 19 2005
a(n) = (sin(n*Pi/2))^2 = (cos(n*Pi/2 +/- Pi/2))^2 with n >= 0. - Paolo P. Lava, Sep 20 2006
Dirichlet g.f.: (1-1/2^s)*zeta(s). - R. J. Mathar, Mar 04 2011
a(n) = ceil(n/2) - floor(n/2). - Arkadiusz Wesolowski, Sep 16 2012
a(n) = ceil( cos(Pi*(n-1))/2 ). - Wesley Ivan Hurt, Jun 16 2013
a(n) = floor((n-1)/2)-floor((n-2)/2). - Mikael Aaltonen, Feb 26 2015
Dirichlet g.f.: L(chi(2),s) with chi(2) the principal Dirichlet character modulo 2. - Ralf Stephan, Mar 27 2015
a(n) = 0^^n = 0^(0^(0...)) (n times), where we take 0^0 to be 1. - Natan Arie' Consigli, May 02 2015
|
|
MAPLE
|
A000035 := n->n mod 2;
[ seq(i mod 2, i=0..100) ];
|
|
MATHEMATICA
|
Nest[Flatten[ # /. {0 -> {0, 1}, 1 -> {0, 1}}] &, {0}, 7] (* Robert G. Wilson v, Mar 05 2005 *)
Nest[ Flatten[ # /. {0 -> {0, 1, 0}}] &, {0}, 5] (* Robert G. Wilson v, Sep 01 2005 *)
CellularAutomaton[50, {{0, 1}, 0}, 104, {All, {0}}] // Flatten (* Zerinvary Lajos, Jul 08 2009 *)
PadLeft[{}, 110, {0, 1}] (* Harvey P. Dale, Sep 25 2011 *)
a[n_] := Floor[(n-1)/2] - Floor[(n-2)/2]; Array[a, 105, 0] (* Robert G. Wilson v, Feb 26 2015 *)
|
|
PROG
|
(PARI) a(n)=n%2;
(PARI) a(n)=direuler(p=1, 100, if(p==2, 1, 1/(1-X)))[n] /* Ralf Stephan, Mar 27 2015 */
(Haskell)
a000035 n = n `mod` 2 -- James Spahlinger, Oct 08 2012
(Haskell)
a000035_list = cycle [0, 1] -- Reinhard Zumkeller, Jan 06 2012
(Maxima) A000035(n):=mod(n, 2)$
makelist(A000035(n), n, 0, 30); /* Martin Ettl, Nov 12 2012 */
(MAGMA) [0^(1 - n mod 2): n in [0..100]]; // Vincenzo Librandi, Nov 09 2014
|
|
CROSSREFS
|
Ones complement of A059841.
Cf. A053644 for most significant bit.
This is Guy Steele's sequence GS(1, 2) (see A135416).
Sequence in context: A173923 A125122 * A188510 A131734 A134452 A073445
Adjacent sequences: A000032 A000033 A000034 * A000036 A000037 A000038
|
|
KEYWORD
|
core,easy,nonn,nice,mult,changed
|
|
AUTHOR
|
N. J. A. Sloane
|
|
STATUS
|
approved
|
|
|
|