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”).

A321992
a(n) is the least prime q different from p = prime(n) such that 2^(q-1) == 1 (mod p), or 0 if no such prime exists.
1
0, 5, 13, 13, 31, 37, 41, 37, 67, 113, 11, 73, 61, 29, 139, 157, 233, 181, 199, 211, 19, 157, 739, 23, 193, 401, 307, 743, 37, 29, 29, 521, 409, 277, 593, 31, 53, 487, 499, 1033, 1069, 541, 571, 97, 1373, 397, 421, 149, 1583, 457, 59, 953, 73, 101, 17, 787, 1609, 541, 461
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