The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A000035 Period 2: repeat [0, 1]; a(n) = n mod 2; parity of n.
(Formerly M0001)
681
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.
Also the binary expansion of 1/3. - _Robert G. Wilson v_, Sep 01 2015
a(n) = A134451(n) mod 2. - _Reinhard Zumkeller_, Oct 27 2007 [Corrected by _Jianing Song_, Nov 22 2019]
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
Also the inverse binomial transform of A131577. - _Paul Curtz_, Nov 16 2016 [an observation forwarded by _Jean-François Alcover_]
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
Paul Barry, A Catalan Transform and Related Transformations on Integer Sequences, Journal of Integer Sequences, Vol. 8 (2005), Article 05.4.5.
F. Javier de Vega, An extension of Furstenberg's theorem of the infinitude of primes, arXiv:2003.13378 [math.NT], 2020.
Clark Kimberling, A Combinatorial Classification of Triangle Centers on the Line at Infinity, J. Int. Seq., Vol. 22 (2019), Article 19.5.4.
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
FORMULA
a(n) = (1 - (-1)^n)/2.
a(n) = n mod 2.
a(n) = 1 - a(n-1).
Multiplicative with a(p^e) = p mod 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) = ceiling((-2)^(-n-1)). - _Reinhard Zumkeller_, Apr 19 2005
Dirichlet g.f.: (1-1/2^s)*zeta(s). - _R. J. Mathar_, Mar 04 2011
a(n) = ceiling(n/2) - floor(n/2). - _Arkadiusz Wesolowski_, Sep 16 2012
a(n) = ceiling( 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
Euler transform and inverse Moebius transform of length 2 sequence [0, 1]. - _Michael Somos_, Feb 20 2024
EXAMPLE
G.f. = x + x^3 + x^5 + x^7 + x^9 + x^11 + x^13 + x^15 + ... - _Michael Somos_, Feb 20 2024
MAPLE
A000035 := n->n mod 2;
[ seq(i mod 2, i=0..100) ];
MATHEMATICA
PadLeft[{}, 110, {0, 1}] (* _Harvey P. Dale_, Sep 25 2011 *)
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 */
(Scheme) (define (A000035 n) (mod n 2)) ;; For R6RS. Use modulo in older Schemes like MIT/GNU Scheme. - _Antti Karttunen_, Mar 21 2017
(Python)
def A000035(n): return n & 1 # _Chai Wah Wu_, May 25 2022
CROSSREFS
Ones complement of A059841.
Cf. A053644 for most significant bit.
This is Guy Steele's sequence GS(1, 2) (see A135416).
Period k zigzag sequences: this sequence (k=2), A007877 (k=4), A260686 (k=6), A266313 (k=8), A271751 (k=10), A271832 (k=12), A279313 (k=14), A279319 (k=16), A158289 (k=18).
Cf. A154955 (Mobius transform), A131577 (binomial transform).
Cf. A111003 (Dgf at s=2), A233091 (Dgf at s=3), A300707 (Dgf at s=4).
Sequence in context: A360113 A361123 A125122 * A188510 A131734 A134452
KEYWORD
cons,core,easy,nonn,nice,mult
AUTHOR
_N. J. A. Sloane_
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 May 19 05:49 EDT 2024. Contains 372666 sequences. (Running on oeis4.)