login
a(n) is the least k such that the remainder when 1000^k is divided by k is n.
0

%I #8 Jul 21 2021 14:00:33

%S 3,62,997,6,115,7,51,14,991,11,23,13,21,17,197,24,983,158,109,35,89,

%T 42,977,61,39,34,139,36,971,38,3291,188,967,66,193,92,57,74,999161,52,

%U 137,479,69,239,191,53,953,49,317,70,73,79,947,65291,63,59,448991,114,941

%N a(n) is the least k such that the remainder when 1000^k is divided by k is n.

%t 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

%t lk[n_]:=Module[{k=1},While[PowerMod[1000,k,k]!=n,k++];k]; Array[lk,60] (* _Harvey P. Dale_, Jul 21 2021 *)

%Y Cf. A036236, A078457, A119678, A119679, A127816, A119715, A119714, A127817, A127818, A127819, A127820, A127821, A128154, A128155, A128156, A128157, A128158, A128159, A128160, A128361, A128362, A128363, A128364, A128365, A128366, A128367, A128368, A128369, A128370, A128371, A128372, A177495.

%Y Cf. A128149, A128150, A128172.

%K nonn

%O 1,1

%A _Alexander Adamchuk_, May 10 2010