A010712 Period 2: repeat (4,7).
4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4, 7, 4
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,1).
Programs
-
Haskell
a010712 = (+ 3) . (4 ^) . flip mod 2 a010712_list = cycle [4, 7] -- Reinhard Zumkeller, Mar 19 2014
-
Magma
&cat [[4, 7]^^50]; // Vincenzo Librandi, Feb 27 2020
-
Mathematica
PadRight[{},120,{4,7}] (* Harvey P. Dale, Nov 15 2012 *)
-
PARI
a(n)=4+n%2*3 \\ Charles R Greathouse IV, Dec 21 2011
Formula
a(n) = -(3/2)*(-1)^n + 11/2. - Paolo P. Lava, Oct 20 2006
a(n) = 3 + 4^(n mod 2). - Reinhard Zumkeller, Sep 23 2007
G.f.: (4+7x)/((1-x)(1+x)). - R. J. Mathar, Nov 21 2011
a(n) = 4 + 2^(1-(-1)^n) - 1. - Vincenzo Librandi, Feb 27 2020
Comments