A010713 Period 2: repeat (4,8).
4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4, 8, 4
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,1).
Crossrefs
Cf. A176218.
Programs
-
Mathematica
Table[4 + 4 Mod[n, 2], {n, 0, 50}] (* Jinyuan Wang, Feb 26 2020 *) LinearRecurrence[{0,1},{4,8},100] (* or *) PadRight[{},100,{4,8}] (* Harvey P. Dale, Aug 29 2023 *)
-
PARI
a(n)=4+n%2*4 \\ Charles R Greathouse IV, Dec 21 2011
Formula
a(n) = -2*(-1)^n + 6. - Paolo P. Lava, Oct 20 2006
From R. J. Mathar, Oct 20 2008: (Start)
a(n) = 4*A000034(n).
G.f.: 4(1+2x)/((1-x)(1+x)). (End)