login
A245641
Prime numbers P such that 8*P^2-1 and 24*P^3-1 are also primes.
3
2, 3, 5, 17, 67, 137, 241, 353, 541, 641, 907, 1033, 1307, 1453, 1607, 1621, 1733, 1811, 2053, 2243, 2273, 2377, 2621, 2963, 3677, 3701, 3881, 3943, 4861, 5261, 5647, 6101, 6823, 7723, 7877, 8081, 8101, 8447, 8923, 9467, 10111, 10223, 11483, 11617, 12161, 12203, 12227, 12457
OFFSET
1,1
COMMENTS
Intersection of A245639 and A245640.
MATHEMATICA
Select[Prime[Range[2000]], PrimeQ[8 #^2 - 1] && PrimeQ[24 #^3 - 1] &] (* Vincenzo Librandi, Sep 08 2014 *)
PROG
(PFGW & SCRIPT)
SCRIPT
DIM n, 0
DIMS t
OPENFILEOUT myf, a(n).txt
LABEL loop1
SET n, n+1
SETS t, %d, %d\,; n; p(n)
PRP 8*n^2-1, t
IF ISPRP THEN GOTO a
GOTO loop1
LABEL a
PRP 24*n^3-1, t
IF ISPRP THEN GOTO b
GOTO loop1
LABEL b
WRITE myf, t
GOTO loop1
(PARI) select(p->isprime(8*p^2-1)&&isprime(24*p^3-1), primes(3000)) \\ Colin Barker, Jul 28 2014
(Magma) [p: p in PrimesUpTo(15000)| IsPrime(8*p^2-1)and IsPrime(24*p^3-1)]; // Vincenzo Librandi, Sep 08 2014
CROSSREFS
Sequence in context: A103074 A173236 A268209 * A082979 A065952 A308316
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jul 28 2014
STATUS
approved