%I #30 Feb 27 2024 10:58:41
%S 3,5,7,11,13,23,37,43,47,53,61,67,71,103,113,127,137,163,167,181,191,
%T 193,211,251,257,263,271,277,293,307,313,331,337,347,373,401,431,433,
%U 443,461,467,487,491,523,541,557,587,593,601,673,677,727,751,757,761
%N Prime numbers p such that 3p - 2 is a prime.
%C Indices of semiprime octagonal numbers. - _Jonathan Vos Post_, Feb 16 2006
%C Daughter primes of order 1. - _Artur Jasinski_, Dec 12 2007
%C A010051(3*a(n)-2) = 1. - _Reinhard Zumkeller_, Jul 02 2015
%D M. Cerasoli, F. Eugeni and M. Protasi, Elementi di Matematica Discreta, Bologna 1988
%D Emanuele Munarini and Norma Zagaglia Salvi, Matematica Discreta, UTET, CittaStudiEdizioni, Milano 1997
%H Vincenzo Librandi, <a href="/A088878/b088878.txt">Table of n, a(n) for n = 1..1000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/OctagonalNumber.html">Octagonal Number.</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/Semiprime.html">Semiprime.</a>
%e For p = 3, 3p - 2 = 7;
%e for p = 523, 3p - 2 = 1567.
%t lst={};Do[p=Prime[n];If[PrimeQ[3*p-2],AppendTo[lst,p]],{n,5!}];lst (* _Vladimir Joseph Stephan Orlovsky_, Dec 22 2008 *)
%t n = 1; a = {}; Do[If[PrimeQ[(Prime[k] + 2n)/(2n + 1)], AppendTo[a, (Prime[k] + 2n)/(2n + 1)]], {k, 1, 500}]; a (* _Artur Jasinski_, Dec 12 2007 *)
%t Select[Prime[Range[150]],PrimeQ[3#-2]&] (* _Harvey P. Dale_, Feb 27 2024 *)
%o (Magma) [ p: p in PrimesUpTo(770) | IsPrime(3*p-2) ]; // _Klaus Brockhaus_, Dec 21 2008
%o (PARI) list(lim)=select(p->isprime(3*p-2),primes(primepi(lim))) \\ _Charles R Greathouse IV_, Jul 25 2011
%o (Haskell)
%o a088878 n = a088878_list !! (n-1)
%o a088878_list = filter ((== 1) . a010051' . subtract 2 . (* 3)) a000040_list
%o -- _Reinhard Zumkeller_, Jul 02 2015
%Y Cf. A000040, A000567, A001222, A001358, A091179, A091180, A091181, A136019, A136020, A153183, A153184.
%Y Cf. A010051, A063908, A172287.
%Y Cf. A259730.
%K easy,nonn
%O 1,1
%A _Giovanni Teofilatto_, Nov 27 2003
%E Corrected and extended by _Ray Chandler_, Dec 27 2003
%E Entry revised by _N. J. A. Sloane_, Nov 28 2006, Jul 08 2010