login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A143959
Final digit of n^(n+1)-(n+1)^n for n>2
0
7, 9, 9, 7, 9, 7, 1, 9, 3, 1, 5, 9, 9, 5, 1, 1, 1, 9, 9, 9, 7, 9, 9, 7, 9, 7, 1, 9, 3, 1, 5, 9, 9, 5, 1, 1, 1, 9, 9, 9, 7, 9, 9, 7, 9, 7, 1, 9, 3, 1, 5, 9, 9, 5, 1, 1, 1, 9, 9, 9, 7, 9, 9, 7, 9, 7, 1, 9, 3, 1, 5, 9, 9, 5, 1, 1, 1, 9, 9, 9, 7, 9, 9, 7, 9, 7, 1, 9, 3, 1, 5, 9, 9, 5, 1, 1, 1, 9, 9, 9
OFFSET
3,1
COMMENTS
Cyclic with a period of 20
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).
MATHEMATICA
Last[IntegerDigits[#^(#+1)-(#+1)^#]]&/@ Range[3, 150] (* Harvey P. Dale, Mar 12 2011 *)
PROG
(Python) # -*- coding: iso-8859-1 -*- from math import * n=3 while n<100: ....r=(n**(n+1)-(n+1)**n)%10 ....print r, ....n=n+1
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
STATUS
approved