login
A240663
Least k such that 8^k == -1 (mod prime(n)), or 0 if no such k exists.
1
0, 1, 2, 0, 5, 2, 4, 3, 0, 14, 0, 6, 10, 7, 0, 26, 29, 10, 11, 0, 0, 0, 41, 0, 8, 50, 0, 53, 6, 14, 0, 65, 34, 23, 74, 0, 26, 27, 0, 86, 89, 30, 0, 16, 98, 0, 35, 0, 113, 38, 0, 0, 4, 25, 8, 0, 134, 0, 46, 35, 47, 146, 17, 0, 26, 158, 5, 0, 173, 58, 44, 0, 0, 62
OFFSET
1,3
COMMENTS
The least k, if it exists, such that prime(n) divides 8^k + 1.
FORMULA
a(n) = A211244(n)/2 if A211244(n) is even, otherwise 0.
MATHEMATICA
Table[p = Prime[n]; s = Select[Range[p/2], PowerMod[8, #, p] == p - 1 &, 1]; If[s == {}, 0, s[[1]]], {n, 100}]
CROSSREFS
Cf. A211244 (order of 8 mod prime(n)).
Sequence in context: A221573 A332453 A359359 * A066283 A267213 A261805
KEYWORD
nonn
AUTHOR
T. D. Noe, Apr 14 2014
STATUS
approved