login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A122182
Least positive number k such that 2^k mod k = 2n, or 0 if no such k exists.
2
1, 3, 6, 10669, 9, 18, 3763, 1010, 20, 35, 2951, 42, 50, 27, 36, 49, 56, 110, 697, 578, 156, 540923, 70, 287, 104, 147, 4044, 970, 220, 59378, 119, 345, 66, 3007, 75, 1990362, 184, 190, 100, 115, 81, 162, 470, 406, 812, 6631, 105, 310, 160, 207, 322
OFFSET
0,2
MATHEMATICA
lpn[n_]:=Module[{k=1}, While[PowerMod[2, k, k]!=2n, k++]; k]; Array[lpn, 60, 0] (* Harvey P. Dale, Jul 23 2012 *)
CROSSREFS
A bisection of A036236: a(n) = A036236(2n).
Cf. A124977.
Sequence in context: A157548 A134901 A157564 * A276701 A157596 A111316
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, May 11 2007, Jul 18 2008
EXTENSIONS
New definition from Benoit Jubin, Jul 17 2008
More terms from Max Alekseyev, May 08 2009
STATUS
approved