login
A176895
Period 4: repeat [1, 4, 2, 4].
11
1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1, 4, 2, 4, 1
OFFSET
0,2
FORMULA
a(n) = 4/gcd(n,4). - Michael Somos, Jan 06 2011
a(n) = 4-(1+(-1)^n)*(5+I^n)/4. - Bruno Berselli, Mar 22 2011
G.f.: ( 1+4*x+2*x^2+4*x^3 ) / ( (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)
MAPLE
seq(op([1, 4, 2, 4]), n=0..50); # Wesley Ivan Hurt, Jul 11 2016
MATHEMATICA
PadRight[{}, 100, {1, 4, 2, 4}] (* Wesley Ivan Hurt, Jul 11 2016 *)
PROG
(PARI) a(n)=4/gcd(n, 4) \\ Charles R Greathouse IV, Oct 07 2015
(Magma) &cat [[1, 4, 2, 4]^^30]; // Wesley Ivan Hurt, Jul 11 2016
CROSSREFS
Cf. A056594.
Sequence in context: A090976 A156199 A135513 * A335261 A351864 A256789
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Apr 28 2010
STATUS
approved