login
A377655
a(n) is the least prime p such that (2^p - 2)/p == n (mod p), or -1 if there is no such prime p.
2
1093, 2, 3, 30577, 7, 41, 13, 43, 2633, 17, 11, 23, 31, 83, 233, 103, 59, 97, 25037, 53, 67, 3323, 14717
OFFSET
0,1
COMMENTS
For n = 23, 27, 37, 40, 42, ..., a(n) > 5 * 10^9 if not -1.
a(23) > 2*10^11 if it is not -1. - Michael S. Branicky, Nov 04 2024
FORMULA
a(n) = prime(i) where A179077(i) = n, if such i exists.
EXAMPLE
a(4) = 7 because (2^7 - 2)/7 = 18 == 4 (mod 7), and 7 is the first prime that works.
MAPLE
f:= p -> (2&^p-2 mod p^2)/p:
V:= Array(0..22): count:= 0:
p:= 1:
for i from 1 while count < 23 do
p:= nextprime(p);
v:= f(p);
if v <= 22 and V[v] = 0 then V[v]:= i; count:= count+1 fi;
od:
convert(V, list);
CROSSREFS
Sequence in context: A240719 A239875 A091673 * A288097 A281001 A271100
KEYWORD
nonn,more
AUTHOR
Robert Israel, Nov 03 2024
STATUS
approved