login
A177496
a(n) is the least k such that the remainder when 1000^k is divided by k is n.
0
3, 62, 997, 6, 115, 7, 51, 14, 991, 11, 23, 13, 21, 17, 197, 24, 983, 158, 109, 35, 89, 42, 977, 61, 39, 34, 139, 36, 971, 38, 3291, 188, 967, 66, 193, 92, 57, 74, 999161, 52, 137, 479, 69, 239, 191, 53, 953, 49, 317, 70, 73, 79, 947, 65291, 63, 59, 448991, 114, 941
OFFSET
1,1
MATHEMATICA
t = Table[0, {98}]; k = 1; While[k < 10000000, a = PowerMod[1000, k, k]; If[a < 99 && t[[a]] == 0, t[[a]] = k; Print[{a, k}]]; k++ ]; t
lk[n_]:=Module[{k=1}, While[PowerMod[1000, k, k]!=n, k++]; k]; Array[lk, 60] (* Harvey P. Dale, Jul 21 2021 *)
KEYWORD
nonn
AUTHOR
Alexander Adamchuk, May 10 2010
STATUS
approved