|
|
A119833
|
|
Primes p such that 2*p#-1 is prime.
|
|
2
|
|
|
2, 3, 5, 7, 17, 19, 37, 71, 79, 113, 857, 863, 16361
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
Table of n, a(n) for n=1..13.
|
|
EXAMPLE
|
2*2 - 1 = 3, 3 prime so a(1)=2;
2*2*3 - 1 = 11, 11 prime so a(2)=3;
2*2*3*5 - 1 = 59, 59 prime so a(3)=5.
|
|
MATHEMATICA
|
Module[{nn=900, pr, pl}, pr=Prime[Range[nn]]; pl=FoldList[Times, pr]; Select[ Thread[{pr, pl}], PrimeQ[2*#[[2]]-1]&][[All, 1]]] (* Harvey P. Dale, May 02 2018 *)
|
|
PROG
|
(Magma) [p:p in PrimesUpTo(4000)|IsPrime(2*&*PrimesUpTo(p)-1)]; // Marius A. Burtea, Mar 25 2019
(Python)
from sympy import isprime, nextprime
def afind(limit):
p = 2
twoprimorialp = 4
while p <= limit:
if isprime(twoprimorialp - 1):
print(p, end=", ")
p = nextprime(p)
twoprimorialp *= p
afind(1000) # Michael S. Branicky, Jan 08 2022
|
|
CROSSREFS
|
Cf. A119834, A119835.
Sequence in context: A059498 A247147 A158085 * A127049 A142885 A108547
Adjacent sequences: A119830 A119831 A119832 * A119834 A119835 A119836
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
Pierre CAMI, May 25 2006
|
|
EXTENSIONS
|
a(13) from Michael S. Branicky, Jan 08 2022
|
|
STATUS
|
approved
|
|
|
|