

A240666


Least k such that k^m == 1 (mod prime(n)) has a solution for some m.


1



3, 2, 2, 3, 2, 2, 2, 2, 5, 2, 3, 2, 2, 2, 5, 2, 2, 2, 2, 7, 3, 3, 2, 3, 2, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 5, 2, 2, 2, 7, 2, 2, 3, 2, 3, 2, 2, 3, 7, 2, 2, 2, 5, 2, 3, 2, 2, 2, 2, 2, 11, 2, 2, 2, 3, 2, 2, 2, 7, 3, 2, 2, 5, 2, 2, 2, 2, 2, 2, 7, 2, 3, 2, 2
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

Looking at sequences A240657A240665, one sees many 0 terms. This sequence finds the least k having a solution. Is the least k always prime?


LINKS

T. D. Noe, Table of n, a(n) for n = 1..10000


MATHEMATICA

Table[p = Prime[n]; k = 2; While[s = Select[Range[p/2], PowerMod[k, #, p] == p  1 &, 1]; s == {}, k++]; k, {n, 100}]


CROSSREFS

Cf. A240657A240665.
Sequence in context: A183049 A178086 A281977 * A052901 A127807 A122028
Adjacent sequences: A240663 A240664 A240665 * A240667 A240668 A240669


KEYWORD

nonn


AUTHOR

T. D. Noe, Apr 15 2014


STATUS

approved



