OFFSET
1,2
COMMENTS
a(n) = 0 only for n = 1, p = 2. For any odd prime, a prime q meeting the requirement does exist.
a(n) is the smallest prime q <> p such that q == 1 (mod ord_{p}(2)), where ord_{p}(2) = A002326((p-1)/2) = A014664(n). Strong conjecture: a(n) < A014664(n)^2. - Thomas Ordowski, Mar 15 2019
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000 (a(1) = 0 inserted by Georg Fischer, May 05 2019)
EXAMPLE
For n = 2, p = prime(2) = 3, the least prime q different from 3 such that 2^(q-1) == 1 (mod 3) is a(2) = 5.
For n = 3, p = prime(3) = 5, the least prime q different from 5 such that 2^(q-1) == 1 (mod 5) is a(3) = 13.
MAPLE
f:= proc(n) local p, q, v, j;
if n = 1 then return 0 fi;
p:= ithprime(n);
v:= numtheory:-order(2, p);
for q from 1 by v do
if q <> p and isprime(q) then return q fi
od
end proc:
map(f, [$1..100]); # Robert Israel, Mar 17 2019
PROG
(PARI) A321992(n)={if(2<n=prime(n), forprime(q=2, , Mod(2, n)^(q-1)==1 && q!=n && return(q)), 0)}
CROSSREFS
KEYWORD
nonn,look
AUTHOR
M. F. Hasler, Mar 15 2019
STATUS
approved