This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A204689 a(n) = n^n (mod 4). 2
 1, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0, 3, 0, 1, 0 (list; graph; refs; listen; history; text; internal format)
 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) a(2k) = A000007(k), a(2k+1) = A010684(k). - Wesley Ivan Hurt, Jun 15 2016 MAPLE A204689:=n->n^n mod 4: seq(A204689(n), n=0..150); # Wesley Ivan Hurt, Jun 15 2016 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 Cf. A000007, A010684, A109718, A174824. Sequence in context: A101270 A155522 A007524 * A109718 A053385 A213543 Adjacent sequences:  A204686 A204687 A204688 * A204690 A204691 A204692 KEYWORD nonn,easy AUTHOR José María Grau Ribas, Jan 18 2012 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified October 21 08:47 EDT 2019. Contains 328292 sequences. (Running on oeis4.)