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!)
A204688 a(n) = n^n (mod 3). 4
1, 1, 1, 0, 1, 2, 0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 1, 2, 0, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
COMMENTS
For n>0, a(n) is periodic with period 6: repeat [1, 1, 0, 1, 2, 0].
Decimal expansion of 1110119/9999990. - David A. Corneth, Jun 28 2016
LINKS
José María Grau and Antonio M. Oller-Marcén, On the last digit and the last non-zero digit of n^n in base b, arXiv preprint arXiv:1203.4066 [math.NT], 2012.
FORMULA
G.f.: (1+x+x^2+x^4+2*x^5-x^6) / (1-x^6). - Bruno Berselli, Jan 18 2012
From Wesley Ivan Hurt, Jun 28 2016: (Start)
a(n) = a(n-6) for n>6.
a(n) = sin(n*Pi/3) * (10*sin(n*Pi/3) + 2*sin(2*n*Pi/3) - sqrt(3) - 2*sqrt(3)*cos(n*Pi/3))/6 for n>0. (End)
a(n) = A010872(A000312(n)). - Michel Marcus, Jun 28 2016
MAPLE
A204688:=n->power(n, n) mod 3: 1, seq(A204688(n), n=1..100); # Wesley Ivan Hurt, Jun 28 2016
MATHEMATICA
Table[PowerMod[n, n, 3], {n, 0, 140}]
PROG
(Magma) [1] cat [Modexp(n, n, 3): n in [1..100]]; // Wesley Ivan Hurt, Jun 28 2016
CROSSREFS
Sequence in context: A060277 A333330 A290825 * A332038 A101672 A083731
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 28 17:25 EDT 2024. Contains 371254 sequences. (Running on oeis4.)