login
A213861
First occurrence of n in A213859.
1
2, 0, 1, 3, 4, 2949, 8, 11, 12, 15, 17, 115, 20, 7863275, 24, 27, 16, 73, 32, 35, 25, 39, 33, 103, 38, 48589961800007, 228, 51, 119, 97, 56, 59, 47, 323, 52, 581, 69, 71, 43, 2277, 77, 17509, 80, 75, 84, 87, 68, 133, 92, 95, 2209, 99, 53, 29363, 104, 107, 6848, 111, 2585, 3241, 116, 449, 120, 7847, 78, 1111, 129, 173, 132, 135, 137, 5340185
OFFSET
0,1
FORMULA
a(n) = smallest k>n such that 2^k == n (mod k+2).
EXAMPLE
Smallest n such that A213859(n) = 7 is 11, so a(7) = 11.
MATHEMATICA
nn = 25; t = Table[-1, {nn}]; Do[p = PowerMod[2, n, n + 2]; If[0 <= p <= nn && t[[p + 1]] == -1, t[[p + 1]] = n], {n, 0, 10^7}]; t (* T. D. Noe, Jun 26 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Jun 22 2012
EXTENSIONS
a(26)-a(50) from T. D. Noe, Jun 26 2012
Terms a(25) and a(51) onward from Max Alekseyev, Feb 01 2014
STATUS
approved