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”).
%I #12 Nov 04 2024 18:32:48
%S 1093,2,3,30577,7,41,13,43,2633,17,11,23,31,83,233,103,59,97,25037,53,
%T 67,3323,14717
%N 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.
%C For n = 23, 27, 37, 40, 42, ..., a(n) > 5 * 10^9 if not -1.
%C a(23) > 2*10^11 if it is not -1. - _Michael S. Branicky_, Nov 04 2024
%F a(n) = prime(i) where A179077(i) = n, if such i exists.
%e a(4) = 7 because (2^7 - 2)/7 = 18 == 4 (mod 7), and 7 is the first prime that works.
%p f:= p -> (2&^p-2 mod p^2)/p:
%p V:= Array(0..22): count:= 0:
%p p:= 1:
%p for i from 1 while count < 23 do
%p p:= nextprime(p);
%p v:= f(p);
%p if v <= 22 and V[v] = 0 then V[v]:= i; count:= count+1 fi;
%p od:
%p convert(V,list);
%Y Cf. A179077, A377669.
%K nonn,more
%O 0,1
%A _Robert Israel_, Nov 03 2024