The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A204671 a(n) = n^n (mod 6). 2
 1, 1, 4, 3, 4, 5, 0, 1, 4, 3, 4, 5, 0, 1, 4, 3, 4, 5, 0, 1, 4, 3, 4, 5, 0, 1, 4, 3, 4, 5, 0, 1, 4, 3, 4, 5, 0, 1, 4, 3, 4, 5, 0, 1, 4, 3, 4, 5, 0, 1, 4, 3, 4, 5, 0, 1, 4, 3, 4, 5, 0, 1, 4, 3, 4, 5, 0, 1, 4, 3, 4, 5, 0, 1, 4, 3, 4, 5, 0, 1, 4, 3, 4, 5, 0, 1, 4 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 COMMENTS For n>0, periodic with period 6 = A174824: repeat [1, 4, 3, 4, 5, 0]. LINKS Andrew Howroyd, Table of n, a(n) for n = 0..1000 Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,1). FORMULA G.f.: (x^6-5*x^5-4*x^4-3*x^3-4*x^2-x-1)/((x-1)*(x+1)*(x^2-x+1)*(x^2+x+1)). [Colin Barker, Jul 20 2012] From Wesley Ivan Hurt, Jun 23 2016: (Start) a(n) = a(n-6) for n>5. a(0) = 1, a(n) = (17 - cos(n*Pi) - 8*cos(n*Pi/3) - 8*cos(2*n*Pi/3) - 4*sqrt(3)*sin(n*Pi/3) - 4*sqrt(3)*sin(2*n*Pi/3))/6 for n>0. (End) a(n) = A010875(A000312(n)). - Michel Marcus, Jun 27 2016 MAPLE A204671:=n->[1, 4, 3, 4, 5, 0][(n mod 6)+1]: 1, seq(A204671(n), n=0..100); # Wesley Ivan Hurt, Jun 23 2016 MATHEMATICA Table[PowerMod[n, n, 6], {n, 0, 140}] Join[{1}, LinearRecurrence[{0, 0, 0, 0, 0, 1}, {1, 4, 3, 4, 5, 0}, 86]] (* Ray Chandler, Aug 26 2015 *) PROG (MAGMA) [1] cat &cat [[1, 4, 3, 4, 5, 0]^^20]; // Wesley Ivan Hurt, Jun 23 2016 (PARI) a(n)=lift(Mod(n, 6)^n) \\ Andrew Howroyd, Feb 25 2018 CROSSREFS Cf. A000312, A010875, A174824, A204690. Sequence in context: A332472 A049788 A002558 * A204816 A204818 A099634 Adjacent sequences:  A204668 A204669 A204670 * A204672 A204673 A204674 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 April 15 19:43 EDT 2021. Contains 342977 sequences. (Running on oeis4.)