login
A240662
Least k such that 7^k == -1 (mod prime(n)), or 0 if no such k exists.
1
1, 0, 2, 0, 5, 6, 8, 0, 11, 0, 0, 0, 20, 3, 0, 13, 0, 30, 33, 35, 12, 39, 0, 44, 48, 50, 0, 53, 0, 7, 63, 0, 34, 0, 37, 75, 26, 81, 0, 86, 89, 6, 5, 12, 49, 0, 105, 0, 0, 114, 58, 119, 120, 0, 128, 131, 134, 0, 69, 10, 0, 146, 0, 0, 52, 79, 55, 28, 173, 174, 16
OFFSET
1,3
COMMENTS
The least k, if it exists, such that prime(n) divides 7^k + 1.
FORMULA
a(1) = 1; for n > 1, a(n) = A211243(n)/2 if A211243(n) is even, otherwise 0.
MATHEMATICA
Table[p = Prime[n]; s = Select[Range[p/2], PowerMod[7, #, p] == p - 1 &, 1]; If[s == {}, 0, s[[1]]], {n, 100}]
CROSSREFS
Cf. A211243 (order of 7 mod prime(n)).
Sequence in context: A245058 A240657 A262420 * A188724 A082832 A334842
KEYWORD
nonn
AUTHOR
T. D. Noe, Apr 14 2014
STATUS
approved