login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A204689 a(n) = n^n (mod 4). 3
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
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
Sequence in context: A007524 A357868 A357881 * A109718 A053385 A213543
KEYWORD
nonn,easy
AUTHOR
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 18 22:09 EDT 2024. Contains 370951 sequences. (Running on oeis4.)