Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #31 Mar 04 2023 16:24:32
%S 4,7,13,19,31,37,49,67,109,139,181,217,247,301,307,319,391,409,451,
%T 517,541,697,721,769,787,811,829,847,877,931,937,991,1039,1099,1117,
%U 1189,1327,1381,1399,1507,1669,1729,1777,1801,1819,1921,1957,1981,2047,2179,2251,2281
%N Numbers of the form 3p - 2 where p and 6p + 1 are prime.
%C This formula produces many primes and semiprimes.
%C Taken just the terms from the sequence above:
%C n is prime for the following values of p: 3, 5, 7, 11, 13, 23, 37, 47, 61, 103, 137, 181, 257, 263, 271, 277, 293, 313, 331, 347, 373, 443, 461, 467, 557, 593, 601, 727, 751, 761.
%C n is a semiprime of the form (6*m + 1 )*(6*n + 1) for the following values of p: 73, 83, 101, 241, 367, 653, 661.
%C n is a semiprime of the form (6*m - 1 )*(6*n - 1) for the following values of p: 107, 131, 151, 173, 397, 503, 607, 641, 683.
%C n is the square of a prime for the following values of p: 2, 17.
%C n is an absolute Fermat pseudoprime for the following value of p: 577.
%C n is a product, not squarefree, of two primes for the following values of p: 283, 311.
%C Note: any number from the sequence is a term of one of the categories above.
%C This sequence is infinite under Dickson's conjecture. - _Charles R Greathouse IV_, Sep 20 2012
%H Marius A. Burtea, <a href="/A216880/b216880.txt">Table of n, a(n) for n = 1..18020</a>
%t 3#-2&/@Select[Prime[Range[200]],PrimeQ[6#+1]&] (* _Harvey P. Dale_, Mar 04 2023 *)
%o (PARI) is(n)=n%3==1 && isprime(n\3+1) && isprime(2*n+5) \\ _Charles R Greathouse IV_, Dec 07 2014
%o (MATLAB) p=primes(10000);
%o m=1;
%o for u=1:1000
%o if isprime(6*p(u)+1)==1
%o sol(m)=3*p(u)-2;
%o m=m+1;
%o end
%o end
%o sol % _Marius A. Burtea_, Apr 10 2019
%o (Magma) [3*p-2:p in PrimesUpTo(1000)| IsPrime(6*p+1)]; // _Marius A. Burtea_, Apr 10 2019
%K nonn
%O 1,1
%A _Marius Coman_, Sep 19 2012
%E a(1) added, comment corrected by _Paolo P. Lava_, Dec 18 2012
%E Missing term 697 added by _Marius A. Burtea_, Apr 10 2019