The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A209466 Final digit of n^n - n. 0
1, 0, 2, 4, 2, 0, 0, 6, 8, 0, 0, 0, 4, 0, 2, 0, 0, 0, 6, 0, 0, 0, 2, 4, 2, 0, 0, 6, 8, 0, 0, 0, 4, 0, 2, 0, 0, 0, 6, 0, 0, 0, 2, 4, 2, 0, 0, 6, 8, 0, 0, 0, 4, 0, 2, 0, 0, 0, 6, 0, 0, 0, 2, 4, 2, 0, 0, 6, 8, 0, 0, 0, 4, 0, 2, 0, 0, 0, 6, 0, 0, 0, 2, 4, 2, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Note: cyclic with a period of 20 for n > 0.
REFERENCES
R. Euler & J. Sadek, "A number that gives the units of n^n", Journal of Recreational Mathematics 29:3 (1998), pp. 203-204.
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1).
FORMULA
a(n) = (n^n-n) mod 10
MAPLE
[seq((n^n-n) mod 10, n=1..40)];
MATHEMATICA
Join[{1}, Table[Mod[PowerMod[n, n, 10] - n, 10], {n, 100}]] (* T. D. Noe, Mar 13 2012 *)
PadRight[{1}, 120, {0, 0, 2, 4, 2, 0, 0, 6, 8, 0, 0, 0, 4, 0, 2, 0, 0, 0, 6, 0}] (* Harvey P. Dale, May 21 2020 *)
PROG
(Perl) print (($_**$_-$_)%10) for (1..40);
(PARI) a(n)=lift(Mod(n, 10)^n-n) \\ Charles R Greathouse IV, Mar 13 2012
CROSSREFS
Cf. A056849.
Sequence in context: A317896 A320364 A318222 * A277659 A331144 A258711
KEYWORD
nonn,easy,base
AUTHOR
Radu Borza, Mar 09 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 13 03:50 EDT 2024. Contains 372497 sequences. (Running on oeis4.)