login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A204688 a(n) = n^n (mod 3). 2
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

Table of n, a(n) for n=0..86.

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.

Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,1).

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

Cf. A000312, A010872, A174824.

Sequence in context: A117210 A060277 A290825 * A101672 A083731 A216266

Adjacent sequences:  A204685 A204686 A204687 * A204689 A204690 A204691

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 21 06:25 EST 2018. Contains 299390 sequences. (Running on oeis4.)