login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A245600 Smallest prime Q such that prime(n)*(2*Q)^prime(n)-1 is prime. 2
2, 2, 2, 7, 5, 109, 23, 3, 2, 2843, 1879, 643, 809, 1153, 653, 2969, 4679, 241, 19, 9749, 6247, 13, 2003, 5639, 3061, 13799, 73, 2, 6733, 113, 2917, 24977, 2411, 19, 6473, 12457, 3187, 6133, 4967, 22643, 26723, 1279, 2837, 5347, 353, 9721, 19, 433 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
Pierre CAMI and Jens Kruse Andersen, Table of n, a(n) for n = 1..200 (first 100 terms from Pierre CAMI)
EXAMPLE
2*(2*2)^2-1 = 31 prime so a(1) = 2.
3*(2*2)^3-1 = 191 prime so a(2) = 2.
MAPLE
A:= proc(n)
local p, q;
p:= ithprime(n);
q:= 1;
do
q:= nextprime(q);
if isprime(p*(2*q)^p-1) then return(q) fi
od:
end proc:
seq(A(n), n=1..50); # Robert Israel, Aug 05 2014
MATHEMATICA
a245600[n_Integer] := Catch[
Do[
If[And[PrimeQ[Q], PrimeQ[Prime[n]*(2*Q)^Prime[n] - 1]] == True,
Throw[Q]],
{Q, 1000000}]
]; Map[a245600, Range[50]] (* Michael De Vlieger, Aug 03 2014 *)
PROG
(PFGW & SCRIPT)
SCRIPT
DIM i, 0
DIM n
DIMS t
OPENFILEOUT myf, b(n).txt
LABEL loop1
SET i, i+1
IF i>100 THEN END
SET n, 0
LABEL loop2
SET n, n+1
SETS t, %d, %d\,; p(i); p(n)
PRP p(i)*(2*p(n))^p(i)-1, t
IF ISPRP THEN GOTO a
GOTO loop2
LABEL a
WRITE myf, t
GOTO loop1
(PARI) a(n)=for(k=1, 10^5, if(ispseudoprime(prime(n)*(2*prime(k))^prime(n)-1), return(prime(k))))
n=1; while(n<100, print1(a(n), ", "); n++) \\ Derek Orr, Jul 27 2014
CROSSREFS
Sequence in context: A279967 A094246 A169592 * A266689 A265988 A340976
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jul 27 2014
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 03:08 EDT 2024. Contains 371918 sequences. (Running on oeis4.)