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.

A322842 Primes p such that both p+2 and p-2 are neither prime nor semiprime.

This page as a plain text file.
%I A322842 #26 Nov 26 2020 07:48:02
%S A322842 173,277,457,607,727,929,1087,1129,1181,1223,1237,1307,1423,1433,1447,
%T A322842 1493,1523,1549,1597,1613,1627,1811,1861,1973,2011,2063,2137,2297,
%U A322842 2347,2377,2399,2423,2677,2693,2753,2767,2797,2819,2851,2917,3023,3313,3323,3449
%N A322842 Primes p such that both p+2 and p-2 are neither prime nor semiprime.
%C A322842 Also: Primes p such that both p+2 and p-2 have at least three prime divisors. - _David A. Corneth_, Dec 28 2018
%H A322842 Alois P. Heinz, <a href="/A322842/b322842.txt">Table of n, a(n) for n = 1..10000</a>
%p A322842 q:= n-> numtheory[bigomega](n)>2:
%p A322842 a:= proc(n) option remember; local p;
%p A322842       p:= `if`(n=1, 1, a(n-1));
%p A322842       do p:= nextprime(p);
%p A322842          if q(p-2) and q(p+2) then break fi
%p A322842       od; p
%p A322842     end:
%p A322842 seq(a(n), n=1..50);  # _Alois P. Heinz_, Dec 28 2018
%t A322842 Select[Prime[Range[1000]], PrimeOmega[#-2] > 2 && PrimeOmega[#+2] > 2&] (* _Jean-François Alcover_, Nov 26 2020 *)
%o A322842 (Java)
%o A322842 boolean isIsolatedPrime(int num){
%o A322842     int upper = num + 2;
%o A322842     int lower = num - 2;
%o A322842     return isPrime(num) &&
%o A322842           !isPrime(upper) &&
%o A322842           !isPrime(lower) &&
%o A322842           !isSemiPrime(upper) &&
%o A322842           !isSemiPrime(lower);
%o A322842    }
%o A322842 (PARI) is(n) = isprime(n) && bigomega(n + 2) > 2 && bigomega(n - 2) > 2 \\ _David A. Corneth_, Dec 28 2018
%Y A322842 Cf. A000040, A001358, A007510, A134797.
%K A322842 nonn
%O A322842 1,1
%A A322842 _Kyle Buscaglia_, Cory Baker, Dec 28 2018