|
|
A072970
|
|
Least k > 0 such that the last digit of k^n is the same as the last digit of n*k.
|
|
0
|
|
|
1, 2, 5, 4, 5, 6, 5, 2, 5, 10, 1, 8, 5, 4, 5, 6, 5, 8, 2, 10, 1, 2, 5, 4, 5, 6, 5, 2, 5, 10, 1, 8, 5, 4, 5, 6, 5, 8, 2, 10, 1, 2, 5, 4, 5, 6, 5, 2, 5, 10, 1, 8, 5, 4, 5, 6, 5, 8, 2, 10, 1, 2, 5, 4, 5, 6, 5, 2, 5, 10, 1, 8, 5, 4, 5, 6, 5, 8, 2, 10, 1, 2, 5, 4, 5, 6, 5, 2, 5, 10, 1, 8, 5, 4, 5, 6, 5, 8, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) is a periodic sequence with period (1, 2, 5, 4, 5, 6, 5, 2, 5, 10, 1, 8, 5, 4, 5, 6, 5, 8, 2, 10) of length 20
|
|
MATHEMATICA
|
kld[n_]:=Module[{k=1}, While[PowerMod[k, n, 10]!=Mod[n*k, 10], k++]; k]; Array[kld, 100] (* Harvey P. Dale, Sep 08 2012 *)
|
|
PROG
|
(PARI) a(n)=if(n<0, 0, k=1; while(abs(k^n%10-(n*k)%10)>0, s++); s)
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,easy,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|