OFFSET
1,1
COMMENTS
LINKS
Karl V. Keller, Jr., Table of n, a(n) for n = 1..1000
EXAMPLE
29 * 2 + 1 = 59, which is prime, and 61 is also prime, so 59 is in the sequence.
29 * 44 + 1 = 1277, which is prime, and 1279 is also prime, so 1277 is in the sequence.
29 * 50 + 1 = 1451, which is prime, and 1453 is also prime, so 1451 is in the sequence.
29 * 54 + 1 = 1567, which is prime, but 1569 = 3 * 523, so 1567 is not in the sequence.
MATHEMATICA
Select[58Range[1500] + 1, PrimeQ[#] && PrimeQ[# + 2] &] (* Alonso del Arte, Oct 31 2014 *)
Select[29*Range[2, 3150, 2], AllTrue[#+{1, 3}, PrimeQ]&]+1 (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 16 2019 *)
PROG
(Python)
from math import *
from sympy import isprime
for n in range(0, 10001):
..if isprime(58*n+1) and isprime(58*n+3): print (58*n+1, end=', ')
(PARI) lista(nn) = {forstep (n=2, nn, 2, if (isprime(p=29*n+1) && isprime(29*n+3), print1(p, ", ")); ); } \\ Michel Marcus, Oct 17 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Karl V. Keller, Jr., Oct 10 2014
STATUS
approved