A123932 a(0) = 1, a(n) = 4 for n > 0.
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (1).
Programs
-
Magma
[4^n mod 12: n in [0..40]]; // Vincenzo Librandi, Apr 23 2015
-
Mathematica
ContinuedFraction[Sqrt[5] - 1, 120] (* Michael De Vlieger, Apr 20 2015 *)
-
Maxima
makelist(if n=0 then 1 else 4, n, 0, 100); /* Bruno Berselli, Apr 24 2015 */
-
PARI
a(n)=(n>=0)+3*(n>0) \\ Jaume Oliver Lafont, Mar 26 2009
-
Sage
[power_mod(4, n, 12) for n in range(0, 84)] # Zerinvary Lajos, Nov 25 2009
Formula
G.f.: (1 + 3*x) / (1 - x).
a(n) = 4 - 3*0^n .
a(n) = 4^n mod 12. - Zerinvary Lajos, Nov 25 2009
E.g.f.: 4*exp(x) - 3. - Elmo R. Oliveira, Aug 06 2024
Comments