login
Period 4: repeat [0, 0, 1, 1].
33

%I #124 Dec 18 2023 12:16:40

%S 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,

%T 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,

%U 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

%N Period 4: repeat [0, 0, 1, 1].

%C Decimal expansion of 1/909.

%C Lexicographically earliest de Bruijn sequence for n = 2 and k = 2.

%C Except for first term, binary expansion of the decimal number 1/10 = 0.000110011001100110011... in base 2. - _Benoit Cloitre_, May 18 2002

%C 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

%C 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

%C Except for first term, parity of the triangular numbers A000217. - _Omar E. Pol_, Jan 17 2012

%C 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

%C Except for first term, parity of Recamán's sequence A005132. - _Omar E. Pol_, Apr 13 2012

%C Inverse binomial transform of A000749(n+1). - _Wesley Ivan Hurt_, Dec 30 2015

%C Least significant bit of tribonacci numbers (A000073). - _Andres Cicuttin_, Apr 04 2016

%H Guenther Schrack, <a href="/A021913/b021913.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Ch#Cheby">Index entries for sequences related to Chebyshev polynomials.</a>

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,-1,1).

%F From _Paul Barry_, Aug 30 2004: (Start)

%F G.f.: x^2*(1 + x)/(1 - x^4).

%F a(n) = 1/2 - cos(Pi*n/2)/2 - sin(Pi*n/2)/2.

%F a(n) = a(n-1) - a(n-2) + a(n-3) for n > 2. (End)

%F 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).

%F a(n) = -a(n-2) + 1, for n >= 2 with a(0) = a(1) = 0.

%F G.f.: x^2/((1 - x)*(1 + x^2)) = x^2/(1 - x + x^2 - x^3).

%F From _Jaume Oliver Lafont_, Dec 05 2008: (Start)

%F a(n) = 1/2 - sin((2n+1)*Pi/4)/sqrt(2).

%F a(n) = 1/2 - cos((2n-1)*Pi/4)/sqrt(2). (End)

%F a(n) = floor((n mod 4)/2). - _Reinhard Zumkeller_, Apr 15 2011

%F Euler transform of length 4 sequence [1, -1, 0, 1]. - _Michael Somos_, Feb 28 2014

%F a(1-n) = a(n) for all n in Z. - _Michael Somos_, Feb 28 2014

%F From _Wesley Ivan Hurt_, Jul 22 2016: (Start)

%F a(n) = a(n-4) for n > 3.

%F a(n) = A133872(n+2).

%F a(n) + a(n+1) = A007877(n). (End)

%F E.g.f.: (exp(x) - sin(x) - cos(x))/2. - _Ilya Gutkovskiy_, Jul 11 2016

%F a(n) = (1 - (-1)^(n*(n-1)/2))/2. - _Guenther Schrack_, Feb 28 2019

%e G.f. = x^2 + x^3 + x^6 + x^7 + x^10 + x^11 + x^14 + x^15 + x^18 + x^19 + ...;

%e 1/909 = 0.001100110011001 ...

%p A021913:=n->floor((n mod 4)/2); seq(A021913(n), n=0..100); # _Wesley Ivan Hurt_, Feb 28 2014

%t Table[Floor[Mod[n,4]/2], {n,0,100}] (* _Wesley Ivan Hurt_, Feb 28 2014 *)

%t a[ n_] := Mod[ Quotient[ n, 2], 2]; (* _Michael Somos_, Feb 28 2014 *)

%t LinearRecurrence[{1,-1,1},{0,0,1}, 100] (* _Ray Chandler_, Aug 25 2015 *)

%t CoefficientList[Series[x^2(1+x)/(1-x^4), {x, 0, 100}], x] (* _Vincenzo Librandi_, Dec 31 2015 *)

%t (1-(-1)^Binomial[Range[0, 100], 2])/2 (* _G. C. Greubel_, Apr 03 2019 *)

%o (PARI) {a(n) = n \ 2 % 2}; /* _Michael Somos_, Feb 28 2014 */

%o (PARI) x='x+O('x^99); concat([0, 0], Vec(x^2/(1-x+x^2-x^3))) \\ _Altug Alkan_, Apr 04 2016

%o (Magma) &cat [[0, 0, 1, 1]^^30]; // _Vincenzo Librandi_, Dec 31 2015

%Y Cf. A000073, A000217, A000749, A005132, A007877, A056594, A062158, A133872, A139600, A139601.

%K nonn,cons,easy

%O 0,1

%A _N. J. A. Sloane_

%E Chebyshev comment from _Wolfdieter Lang_, Sep 10 2004