cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A178068 Primes p such that 2p+1, 3p+2 and 5p-2 are also primes.

This page as a plain text file.
%I A178068 #25 Apr 29 2024 09:08:47
%S A178068 3,5,23,89,173,233,239,1223,1409,1559,2549,2693,3389,3803,4373,4919,
%T A178068 9059,10313,16493,17159,20879,20939,22013,24473,25229,31649,32933,
%U A178068 34253,34883,37049,38453,39089,40283,41399,43793,44543,49103,49919,50993,54293,55673
%N A178068 Primes p such that 2p+1, 3p+2 and 5p-2 are also primes.
%C A178068 Subsequence of A067256. - _R. J. Mathar_, May 31 2010
%H A178068 Amiram Eldar, <a href="/A178068/b178068.txt">Table of n, a(n) for n = 1..10000</a>
%e A178068 a(1) = 3 because 3, 2*3+1 = 7, 3*3+2 = 11 and 5*3-2 = 13 are all primes.
%p A178068 q:= p-> andmap(isprime, [p, 2*p+1, 3*p+2, 5*p-2]):
%p A178068 select(q, [$2..60000])[];  # _Alois P. Heinz_, May 11 2023
%t A178068 Select[Prime[Range[6000]], And @@ PrimeQ[{2*# + 1, 3*# +2, 5*# - 2}] &] (* _Amiram Eldar_, Apr 29 2024 *)
%o A178068 (UBASIC) 10 N=3:print N:goto 60
%o A178068 20 A=3:S=sqrt(N)
%o A178068 30 B=N/A
%o A178068 40 if int(B)*A=N then 120
%o A178068 50 A=A+2:if A<=S then 30
%o A178068 60 print N:R=N*2+1:O=N*3+2:P=N*5-2
%o A178068 70 'if R=prmdiv(R) then print "r";R;
%o A178068 80 'if O=prmdiv(O) then print "o";O;
%o A178068 90 'if P=prmdiv(P) then print "p";P;
%o A178068 100 if R=prmdiv(R) and O=prmdiv(O) and P=prmdiv(P) then print R;O;P:stop
%o A178068 110 T=T+1:if T>3 then R=0:O=0:P=0:T=0
%o A178068 120 N=N+2:goto 20
%o A178068 (Magma) [n: n in [0..1000]| IsPrime(n)and IsPrime(2*n+1)and IsPrime(3*n+2) and IsPrime(5*n-2)] // _Vincenzo Librandi_, Dec 05 2010
%o A178068 (PARI) is(p) = isprime(p) && isprime(2*p+1) && isprime(3*p+2) && isprime(5*p-2); \\ _Amiram Eldar_, Apr 29 2024
%Y A178068 Cf. A067256.
%K A178068 easy,nonn
%O A178068 1,1
%A A178068 _Enoch Haga_, May 19 2010