%I #22 Oct 14 2016 01:14:06
%S 2,29,7,29787,13,113413,51,23,11,3309,38,19,21,17,22,115,118,37237,
%T 261,60212617,94,29769,134,51205605391,26,35,209,549,466,1558391,37,
%U 5033228393,58,39,926,565,57,1561,922,119,46,2512157,111,949,76,85
%N a(n) = least k such that the remainder when 31^k is divided by k is n.
%H Robert G. Wilson v, <a href="/A128371/a128371.txt">Table of n, a(n) for n = 1..10000 with -1 for large entries where a(n) has not yet been found</a> [Superseded by Cariboni table]
%H Fausto A. C. Cariboni, <a href="/A128371/a128371_1.txt">Table of n, a(n) for n = 1..10000 with -1 for large entries where a(n) has not yet been found</a>, Sep 14 2016 [With 123 new terms, this supersedes the earlier table from Robert G. Wilson v et al.]
%t t = Table[0, {10000} ]; k = 1; While[ k < 4750000000, a = PowerMod[31, k, k]; If[a < 10001 && t[[a]] == 0, t[[a]] = k; Print[{a, k}]]; k++ ]; t (* _Robert G. Wilson v_, Aug 06 2009 *)
%Y Cf. A128361, A128362, A128363, A128364, A128365, A128366, A128367, A128368, A129369, A128370, A128372.
%Y Cf. A036236, A078457, A119678, A119679, A127816, A119715, A119714, A127817, A127818, A127819, A127820, A127821, A128154, A128155, A128156, A128157, A128158, A128159, A128160.
%Y Cf. A128149, A128150, A128172.
%K hard,nonn
%O 1,1
%A _Alexander Adamchuk_, Feb 27 2007
%E More terms from _Ryan Propper_, Mar 24 2007
%E a(494) = 14353729267 = 64609 * 222163. a(498) = 9547024387, a(540) = 29711794103. - _Daniel Morel_, Jun 17 2010. a(618) = 15150617101, a(750) = 13728669221. - _Daniel Morel_, Jun 28 2010