|
|
A000035
|
|
Period 2: repeat [0, 1]; a(n) = n mod 2; parity of n.
(Formerly M0001)
|
|
633
|
|
|
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;
constant;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,1
|
|
COMMENTS
|
Least significant bit of n, lsb(n).
Also decimal expansion of 1/99.
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
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)
a(n) = (4/n), where (k/n) is the Kronecker symbol. See the Eric Weisstein link. - Wolfdieter Lang, May 28 2013
The emanation sequence for the globe category. That is take the globe category, take the corresponding polynomial comonad, consider its carrier polynomial as a generating function, and take the corresponding sequence. - David Spivak, Sep 25 2020
For n > 0, a(n) is the alternating sum of the product of n increasing and n decreasing odd factors. For example, a(4) = 1*7 - 3*5 + 5*3 - 7*1 and a(5) = 1*9 - 3*7 + 5*5 - 7*3 + 9*1. - Charlie Marion, Mar 24 2022
|
|
REFERENCES
|
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (1 - (-1)^n)/2.
a(n) = n mod 2.
a(n) = 1 - a(n-1).
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) = (sin(n*Pi/2))^2 = (cos(n*Pi/2 +- Pi/2))^2 for n >= 0. - Paolo P. Lava, Sep 20 2006
Dirichlet g.f.: (1-1/2^s)*zeta(s). - R. J. Mathar, Mar 04 2011
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
|
[ seq(i mod 2, i=0..100) ];
|
|
MATHEMATICA
|
|
|
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)
(Haskell)
(Scheme) (define (A000035 n) (mod n 2)) ;; For R6RS. Use modulo in older Schemes like MIT/GNU Scheme. - Antti Karttunen, Mar 21 2017
(Python)
|
|
CROSSREFS
|
Cf. A053644 for most significant bit.
This is Guy Steele's sequence GS(1, 2) (see A135416).
|
|
KEYWORD
|
cons,core,easy,nonn,nice,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|