cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A176040 Periodic sequence: Repeat 3, 1.

Original entry on oeis.org

3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3
Offset: 0

Views

Author

Klaus Brockhaus, Apr 07 2010

Keywords

Comments

Interleaving of A010701 and A000012.
Also continued fraction expansion of (3+sqrt(21))/2.
Also decimal expansion of 31/99.
Essentially first differences of A014601.
Inverse binomial transform of 3 followed by A020707.
Second inverse binomial transform of A052919 without initial term 2.
Third inverse binomial transform of A007582 without initial term 1.
Exp( Sum_{n >= 1} a(n)*x^n/n ) = 1 + x + 2*x^2 + 2*x^3 + 3*x^4 + 3*x^5 + ... is the o.g.f. for A008619. - Peter Bala, Mar 13 2015

Crossrefs

Cf. A153284, A010701 (all 3's sequence), A000012 (all 1's sequence), A090458 (decimal expansion of (3+sqrt(21))/2), A010684 (repeat 1, 3), A014601 (congruent to 0 or 3 mod 4), A020707 (2^(n+2)), A052919, A007582 (2^(n-1)*(1+2^n)), A008619.

Programs

  • Magma
    &cat[ [3, 1]: n in [0..52] ];
    [ 2+(-1)^n: n in [0..104] ];
  • Mathematica
    PadRight[{},120,{3,1}] (* or *) LinearRecurrence[{0,1},{3,1},120] (* Harvey P. Dale, Mar 11 2015 *)

Formula

a(n) = 2+(-1)^n.
a(n) = a(n-2) for n > 1; a(0) = 3, a(1) = 1.
a(n) = -a(n-1)+4 for n > 0; a(0) = 3.
a(n) = 3*((n+1) mod 2)+(n mod 2).
a(n) = A010684(n+1).
G.f.: (3+x)/((1-x)*(1+x)).
From Amiram Eldar, Jan 01 2023: (Start)
Multiplicative with a(2^e) = 3, and a(p^e) = 1 for p >= 3.
Dirichlet g.f.: zeta(s)*(1+2^(1-s)). (End)