A010694 Period 2: repeat (2,4).
2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2
Offset: 0
Links
- INRIA Algorithms Project, Encyclopedia of Combinatorial Structures 1073
- Index entries for linear recurrences with constant coefficients, signature (0,1).
Programs
-
Mathematica
ContinuedFraction[1 + Sqrt[6]/2, 100] (* Alonso del Arte, Mar 25 2020 *)
-
PARI
a(n)=2*(1+n%2) \\ Jaume Oliver Lafont, Mar 20 2009
-
Scala
(0 to 99).map( % 2 * 2 + 2) // _Alonso del Arte, Mar 25 2020
Formula
From R. J. Mathar, Aug 28 2008: (Start)
a(n) = 2 * A000034(n).
G.f.: 2(1 + 2x)/((1 - x)(1 + x)). (End)
a(n) = a(n-2) for n >= 2. - Jaume Oliver Lafont, Mar 20 2009
a(n) = 2^(n+1) mod 6. - Roderick MacPhee, Mar 31 2011
Comments