[go: up one dir, main page]

login
A124977
Least positive number k such that 2^k mod k = 2n+1, or 0 if no such k exists.
8
0, 4700063497, 19147, 25, 2228071, 262279, 95, 481, 45, 2873, 3175999, 555, 95921, 174934013, 777, 140039, 2463240427, 477, 91, 623, 2453, 55, 345119, 1131, 943, 21967, 135, 46979, 125, 3811, 23329, 155, 1064959, 245
OFFSET
0,2
FORMULA
A bisection of A036236: a(n) = A036236(2n+1).
EXAMPLE
a(3) = 25 because 2^25 = 33554432 = 7 + 25*1342177.
MATHEMATICA
nk[n_] := Module[ {k}, k = 1;
While[PowerMod[2, k, k] != 2 n + 1, k++]; k]
Join[{0}, Table[nk[i], {i, 1, 33}]] (* Robert Price, Oct 11 2018 *)
KEYWORD
nonn
AUTHOR
Zak Seidov, Nov 14 2006
EXTENSIONS
Edited by Max Alekseyev, May 20 2011
STATUS
approved