login
A224610
Smallest j such that j*2*prime(n)^3-1 and j*2*prime(n)*q^2-1 are prime.
4
2, 2, 5, 7, 59, 142, 264, 25, 8, 21, 124, 33, 60, 87, 9, 231, 5, 6, 82, 155, 7, 66, 72, 21, 42, 105, 15, 48, 250, 68, 222, 54, 47, 195, 255, 360, 205, 6, 83, 26, 5, 1, 50, 220, 173, 1, 976, 30, 228, 130, 30, 129, 46, 1106, 65, 62, 15, 109, 24, 41, 922, 15, 132, 89
OFFSET
1,1
MATHEMATICA
a[n_] := For[p = Prime[n]; j = 1, j < 10^6, j++, If[PrimeQ[q = j*2*p^3 - 1] && PrimeQ[j*p*2*q^2 - 1], Return[j]]]; Table[a[n], {n, 1, 75}] (* Jean-François Alcover, Apr 22 2013 *)
PROG
(PFGW & SCRIPTIFY)
SCRIPT
DIM n, 1
DIM j
DIM q
DIMS t
OPENFILEOUT myf, a(n).txt
LABEL a
SET n, n+1
SET j, 0
LABEL b
SET j, j+1
SET q, j*2*p(n)^3-1
SETS t, %d\,; p(n)
PRP q, t
IF ISPRP THEN GOTO c
GOTO b
LABEL c
SET q, j*2*p(n)*q^2-1
PRP q, t
IF ISPRP THEN GOTO d
GOTO b
LABEL d
WRITE myf, t
GOTO a
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Apr 12 2013
STATUS
approved