OFFSET
1,1
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn
AUTHOR
Pierre CAMI, Jul 28 2014
STATUS
approved