proposed
approved
proposed
approved
editing
proposed
a(n) = (1/24)*{29*(n mod 4)-[(n+1) mod 4]+23*[(n+2) mod 4]-7*[(n+3) mod 4]}. - Paolo P. Lava, Apr 30 2010
a(n) = (11-I^n-5*(-1)^n-(-I)^n)/4 = 11/4-5*(-1)^n/4 -A056594(n)/2, with I=sqrt(-1). - Paolo P. Lava, Apr 30 2010
approved
editing
(MAGMAMagma) &cat [[1, 4, 2, 4]^^30]; // Wesley Ivan Hurt, Jul 11 2016
reviewed
approved
proposed
reviewed
editing
proposed
Period 4: repeat [1, 4, 2, 4].
<a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,1).
a(n) = (1/24)*{29*(n mod 4)-[(n+1) mod 4]+23*[(n+2) mod 4]-7*[(n+3) mod 4]}. - Paolo P. Lava, Apr 30 2010
a(n) = (11-I^n-5*(-1)^n-(-I)^n)/4 = 11/4-5*(-1)^n/4 -A056594(n)/2, with I=sqrt(-1). - Paolo P. Lava, Apr 30 2010
G.f. : ( -1-+4*x-+2*x^2-+4*x^3 ) / ( (x-1-x)*(1+x)*(x^2+1) ). - R. J. Mathar, Mar 21 2011
From Wesley Ivan Hurt, Jul 11 2016: (Start)
a(n) = a(n-4) for n>3.
a(n) = 2^((5-(-I)^n-I^n-3*I^(2*n))/4) where I=sqrt(-1). (End)
seq(op([1, 4, 2, 4]), n=0..50); # Wesley Ivan Hurt, Jul 11 2016
PadRight[{}, 100, {1, 4, 2, 4}] (* Wesley Ivan Hurt, Jul 11 2016 *)
(MAGMA) &cat [[1, 4, 2, 4]^^30]; // Wesley Ivan Hurt, Jul 11 2016
Cf. A056594.
approved
editing
editing
approved
(PARI) a(n)=4/gcd(n, 4) \\ Charles R Greathouse IV, Oct 07 2015
approved
editing