login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

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 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A213740 a(n) is the smallest prime of the form n*m^q - 1 where m is an integer > 1 and q >= 2. 3

%I

%S 3,7,11,31,19,23,223,31,71,79,43,47,103,223,59,127,67,71,151,79,83,

%T 197,367,191,199,103,107,223,463,239,991,127,131,271,139,971,11987,

%U 151,311,359,163,167,5503,1187,179,367,751,191,1567,199,5099,467,211,431

%N a(n) is the smallest prime of the form n*m^q - 1 where m is an integer > 1 and q >= 2.

%H Michel Marcus, <a href="/A213740/b213740.txt">Table of n, a(n) for n = 1..10000</a>

%e a(10) = 79 = 10*2^3 - 1.

%p f:= proc(n) local m,k,p,x,xm,dm;

%p p:= 1; xm:= infinity;

%p if n::odd then dm:= 2 else dm:= 1 fi;

%p do

%p p:= nextprime(p);

%p if n*2^p-1 > xm then return xm fi;

%p if not irreduc(n*X^p-1) then next fi;

%p for m from 2 by dm do

%p x:= n*m^p-1;

%p if x > xm then break fi;

%p if isprime(x) then xm:= x; break fi;

%p od

%p od

%p end proc:

%p f(1):= 3:

%p map(f, [$1..100]); # _Robert Israel_, Feb 26 2018

%o (PARI) a(n) = {forprime(p=2, , qq = (p+1)/n; if ((denominator(qq) == 1) && ispower(qq), return (p)););} \\ _Michel Marcus_, Feb 25 2018

%Y Cf. A001597, A213738.

%K nonn

%O 1,1

%A _Michel Lagneau_, Jun 19 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 9 03:23 EST 2021. Contains 349625 sequences. (Running on oeis4.)