OFFSET
0,4
COMMENTS
Apart from a(0), the same as A109718. [Joerg Arndt, Sep 17 2013]
Periodic for n>0 with period 4 = A174824(4): repeat [1, 0, 3, 0].
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,1).
FORMULA
From Bruno Berselli, Jan 18 2012: (Start)
G.f.: (1+x+3x^3-x^4)/(1-x^4).
a(n) = (1-(-1)^n)*(2+i^(n+1))/2 with i=sqrt(-1), a(0)=1.
a(n) = A109718(n) for n>0. (End)
MAPLE
MATHEMATICA
Table[PowerMod[n, n, 4], {n, 0, 140}]
PROG
(Magma) [1] cat &cat [[1, 0, 3, 0]^^30]; // Wesley Ivan Hurt, Jun 15 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
José María Grau Ribas, Jan 18 2012
STATUS
approved