(MAGMAMagma) [p: p in PrimesUpTo(70000)| IsPrime(3*p-2)and IsPrime(3*p+2)] // Vincenzo Librandi, Jan 29 2011
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”).
(MAGMAMagma) [p: p in PrimesUpTo(70000)| IsPrime(3*p-2)and IsPrime(3*p+2)] // Vincenzo Librandi, Jan 29 2011
editing
approved
Select[Prime[Range[600]], AllTrue[3#+{2, -2}, PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, May 29 2021 *)
approved
editing
reviewed
approved
proposed
reviewed
editing
proposed
Primes p such that 3p -/ 2 and 3p + 2 are also primes.
a(n) = A125215(n)/3.
(MAGMA) [p: p in PrimesUpTo(70000)| IsPrime(3*p-2)and IsPrime(3*p+2)] [From // _Vincenzo Librandi, _, Jan 29 2011]
approved
editing
editing
approved
nonn,changed,easy
Charles R Greathouse IV, <a href="/A125272/b125272.txt">Table of n, a(n) for n = 1..10000</a>
lst={}; Do[p=Prime[n]; If[PrimeQ[3*p-2]&&PrimeQ[3*p+2], AppendTo[lst, p]], {n, 7!}]; lst [From _(* _Vladimir Joseph Stephan Orlovsky_, Jan 18 2009] *)
(PARI) is(n)=isprime(3*n-2)&&isprime(3*n+2)&&isprime(n) \\ Charles R Greathouse IV, Jul 02 2013
approved
editing