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!)
 A072968 Least k>0 such that the last digit of (n+k)^(n+k) is the same as the last digit of n^n. 0
 10, 16, 14, 2, 10, 2, 6, 4, 10, 10, 10, 2, 14, 2, 10, 8, 6, 4, 10, 10, 10, 16, 14, 2, 10, 2, 6, 4, 10, 10, 10, 2, 14, 2, 10, 8, 6, 4, 10, 10, 10, 16, 14, 2, 10, 2, 6, 4, 10, 10, 10, 2, 14, 2, 10, 8, 6, 4, 10, 10, 10, 16, 14, 2, 10, 2, 6, 4, 10, 10, 10, 2, 14, 2, 10, 8, 6, 4, 10, 10, 10 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 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) is periodic with period (10, 16, 14, 2, 10, 2, 6, 4, 10, 10, 10, 2, 14, 2, 10, 8, 6, 4, 10, 10, 10) of length 20 MATHEMATICA ld[n_]:=Module[{ldn=Mod[n^n, 10], k=1}, While[Mod[(n+k)^(n+k), 10] != ldn, k++]; k]; Array[ld, 90] (* Harvey P. Dale, Sep 07 2012 *) LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {10, 16, 14, 2, 10, 2, 6, 4, 10, 10, 10, 2, 14, 2, 10, 8, 6, 4, 10, 10}, 81] (* Ray Chandler, Aug 26 2015 *) PROG (PARI) a(n)=if(n<0, 0, s=1; while(abs((n+s)^(n+s)%10-n^n%10)>0, s++); s) CROSSREFS Sequence in context: A232608 A175335 A167788 * A072138 A109891 A104869 Adjacent sequences:  A072965 A072966 A072967 * A072969 A072970 A072971 KEYWORD base,easy,nonn AUTHOR Benoit Cloitre, Aug 13 2002 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 September 28 01:20 EDT 2020. Contains 337388 sequences. (Running on oeis4.)