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
Sébastien Dumortier, Sep 05 2008
STATUS
approved