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

A213740
a(n) is the smallest prime of the form n*m^q - 1 where m is an integer > 1 and q >= 2.
3
3, 7, 11, 31, 19, 23, 223, 31, 71, 79, 43, 47, 103, 223, 59, 127, 67, 71, 151, 79, 83, 197, 367, 191, 199, 103, 107, 223, 463, 239, 991, 127, 131, 271, 139, 971, 11987, 151, 311, 359, 163, 167, 5503, 1187, 179, 367, 751, 191, 1567, 199, 5099, 467, 211, 431
OFFSET
1,1
LINKS
EXAMPLE
a(10) = 79 = 10*2^3 - 1.
MAPLE
f:= proc(n) local m, k, p, x, xm, dm;
p:= 1; xm:= infinity;
if n::odd then dm:= 2 else dm:= 1 fi;
do
p:= nextprime(p);
if n*2^p-1 > xm then return xm fi;
if not irreduc(n*X^p-1) then next fi;
for m from 2 by dm do
x:= n*m^p-1;
if x > xm then break fi;
if isprime(x) then xm:= x; break fi;
od
od
end proc:
f(1):= 3:
map(f, [$1..100]); # Robert Israel, Feb 26 2018
MATHEMATICA
a[n_] := Module[{p, qq}, For[p = 2, True, p = NextPrime[p], qq = (p+1)/n; If[Denominator[qq] == 1 && GCD @@ FactorInteger[qq][[All, 2]] > 1, Return[p]]]];
Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Feb 08 2023, after Michel Marcus *)
PROG
(PARI) a(n) = {forprime(p=2, , qq = (p+1)/n; if ((denominator(qq) == 1) && ispower(qq), return (p)); ); } \\ Michel Marcus, Feb 25 2018
CROSSREFS
Sequence in context: A125879 A238673 A318263 * A267357 A152084 A274134
KEYWORD
nonn
AUTHOR
Michel Lagneau, Jun 19 2012
STATUS
approved