login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A003560
Least number m such that 4^m == +- 1 (mod 4n + 1).
1
1, 1, 3, 3, 2, 3, 5, 7, 5, 9, 5, 6, 21, 13, 9, 15, 3, 11, 9, 15, 27, 4, 11, 5, 12, 25, 6, 9, 7, 6, 55, 25, 7, 9, 17, 23, 7, 37, 12, 13, 33, 10, 39, 43, 29, 45, 9, 9, 24, 49, 33, 5, 45, 35, 15, 12, 30, 19, 29, 39, 6, 42, 41, 55, 4, 42, 13, 67, 6, 23, 35, 18, 34
OFFSET
0,3
LINKS
FORMULA
a(n) <= A003573(n). - Michel Marcus, Jun 10 2019
MATHEMATICA
Table[Module[{m=1}, While[PowerMod[4, m, 4 n + 1]!=1 && PowerMod[4, m, 4 n + 1]!=4 n, m++]; m], {n, 0, 70}] (* Vincenzo Librandi, Jun 10 2019 *)
PROG
(PARI) a(n) = {my(m=1); while (((mm=Mod(4, 4*n+1)^m) != 1) && (mm != 4*n), m++); m; } \\ Michel Marcus, Jun 10 2019
CROSSREFS
Cf. A003573.
Sequence in context: A129309 A268931 A360206 * A262212 A378451 A123676
KEYWORD
nonn
STATUS
approved