OFFSET
0,1
COMMENTS
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
LINKS
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)
MATHEMATICA
PadRight[{}, 120, {3, 1}] (* or *) LinearRecurrence[{0, 1}, {3, 1}, 120] (* Harvey P. Dale, Mar 11 2015 *)
PROG
(Magma) &cat[ [3, 1]: n in [0..52] ];
[ 2+(-1)^n: n in [0..104] ];
CROSSREFS
KEYWORD
AUTHOR
Klaus Brockhaus, Apr 07 2010
STATUS
approved