login
A021913
Period 4: repeat [0, 0, 1, 1].
33
0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1
OFFSET
0,1
COMMENTS
Decimal expansion of 1/909.
Lexicographically earliest de Bruijn sequence for n = 2 and k = 2.
Except for first term, binary expansion of the decimal number 1/10 = 0.000110011001100110011... in base 2. - Benoit Cloitre, May 18 2002
Content of #2 binary placeholder when n is converted from decimal to binary. a(n) = n*(n-1)/2 mod 2. Example: a(7) = 1 since 7 in binary is 1 -1- 1 and (7*6/2) mod 2 = 1. - Anne M. Donovan (anned3005(AT)aol.com), Sep 15 2003
Expansion in any base b of 1/((b-1)*(b^2+1)) = 1/(b^3-b^2+b-1). E.g., 1/5 in base 2, 1/20 in base 3, 1/51 in base 4, etc. - Franklin T. Adams-Watters, Nov 07 2006
Except for first term, parity of the triangular numbers A000217. - Omar E. Pol, Jan 17 2012
Except for first term, more generally: 1) Parity of the k-polygonal numbers, if k is odd (Cf. A139600, A139601). 2) Parity of the generalized k-gonal numbers, for even k >= 6. - Omar E. Pol, Feb 05 2012
Except for first term, parity of Recamán's sequence A005132. - Omar E. Pol, Apr 13 2012
Inverse binomial transform of A000749(n+1). - Wesley Ivan Hurt, Dec 30 2015
Least significant bit of tribonacci numbers (A000073). - Andres Cicuttin, Apr 04 2016
FORMULA
From Paul Barry, Aug 30 2004: (Start)
G.f.: x^2*(1 + x)/(1 - x^4).
a(n) = 1/2 - cos(Pi*n/2)/2 - sin(Pi*n/2)/2.
a(n) = a(n-1) - a(n-2) + a(n-3) for n > 2. (End)
a(n+2) = Sum_{k=0..n} b(k), with b(k) = A056594(k) (partial sums of S(n,x) Chebyshev polynomials at x=0).
a(n) = -a(n-2) + 1, for n >= 2 with a(0) = a(1) = 0.
G.f.: x^2/((1 - x)*(1 + x^2)) = x^2/(1 - x + x^2 - x^3).
From Jaume Oliver Lafont, Dec 05 2008: (Start)
a(n) = 1/2 - sin((2n+1)*Pi/4)/sqrt(2).
a(n) = 1/2 - cos((2n-1)*Pi/4)/sqrt(2). (End)
a(n) = floor((n mod 4)/2). - Reinhard Zumkeller, Apr 15 2011
Euler transform of length 4 sequence [1, -1, 0, 1]. - Michael Somos, Feb 28 2014
a(1-n) = a(n) for all n in Z. - Michael Somos, Feb 28 2014
From Wesley Ivan Hurt, Jul 22 2016: (Start)
a(n) = a(n-4) for n > 3.
a(n) = A133872(n+2).
a(n) + a(n+1) = A007877(n). (End)
E.g.f.: (exp(x) - sin(x) - cos(x))/2. - Ilya Gutkovskiy, Jul 11 2016
a(n) = (1 - (-1)^(n*(n-1)/2))/2. - Guenther Schrack, Feb 28 2019
EXAMPLE
G.f. = x^2 + x^3 + x^6 + x^7 + x^10 + x^11 + x^14 + x^15 + x^18 + x^19 + ...;
1/909 = 0.001100110011001 ...
MAPLE
A021913:=n->floor((n mod 4)/2); seq(A021913(n), n=0..100); # Wesley Ivan Hurt, Feb 28 2014
MATHEMATICA
Table[Floor[Mod[n, 4]/2], {n, 0, 100}] (* Wesley Ivan Hurt, Feb 28 2014 *)
a[ n_] := Mod[ Quotient[ n, 2], 2]; (* Michael Somos, Feb 28 2014 *)
LinearRecurrence[{1, -1, 1}, {0, 0, 1}, 100] (* Ray Chandler, Aug 25 2015 *)
CoefficientList[Series[x^2(1+x)/(1-x^4), {x, 0, 100}], x] (* Vincenzo Librandi, Dec 31 2015 *)
(1-(-1)^Binomial[Range[0, 100], 2])/2 (* G. C. Greubel, Apr 03 2019 *)
PROG
(PARI) {a(n) = n \ 2 % 2}; /* Michael Somos, Feb 28 2014 */
(PARI) x='x+O('x^99); concat([0, 0], Vec(x^2/(1-x+x^2-x^3))) \\ Altug Alkan, Apr 04 2016
(Magma) &cat [[0, 0, 1, 1]^^30]; // Vincenzo Librandi, Dec 31 2015
KEYWORD
nonn,cons,easy
EXTENSIONS
Chebyshev comment from Wolfdieter Lang, Sep 10 2004
STATUS
approved