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.

A346659 Primes that are not of the form p*q +- 2 where p and q are primes (not necessarily distinct).

This page as a plain text file.
%I A346659 #28 Nov 27 2022 01:14:04
%S A346659 3,5,29,43,61,73,101,103,107,137,149,151,173,191,193,197,227,229,241,
%T A346659 271,277,281,283,313,347,349,421,431,433,457,461,463,523,569,601,607,
%U A346659 617,619,641,643,659,661,727,821,823,827,857,859,883,929,1019,1021,1031
%N A346659 Primes that are not of the form p*q +- 2 where p and q are primes (not necessarily distinct).
%C A346659 Conjecture: this sequence is infinite.
%H A346659 Robert Israel, <a href="/A346659/b346659.txt">Table of n, a(n) for n = 1..10000</a>
%e A346659 2 is not a term because 2 = 2*2 - 2.
%e A346659 3 is a term because neither 1 (3-2) nor 5 (3+2) is a product of two primes.
%p A346659 q:= n-> andmap(x-> numtheory[bigomega](x)<>2, [n-2, n+2]):
%p A346659 select(q, [ithprime(i)$i=1..200])[];  # _Alois P. Heinz_, Jul 30 2021
%t A346659 Select[Range[3, 1000], PrimeQ[#] && PrimeOmega[# - 2] != 2 && PrimeOmega[# + 2] != 2 &] (* _Amiram Eldar_, Jul 29 2021 *)
%o A346659 (Python)
%o A346659 from sympy import factorint, primerange
%o A346659 def semiprime(n): return sum(e for e in factorint(n).values()) == 2
%o A346659 def ok(p): return not semiprime(p-2) and not semiprime(p+2)
%o A346659 def aupto(limit): return list(filter(ok, primerange(1, limit+1)))
%o A346659 print(aupto(1031)) # _Michael S. Branicky_, Jul 29 2021
%Y A346659 Cf. A207526 (complementary sequence).
%K A346659 nonn
%O A346659 1,1
%A A346659 _Marcin Barylski_, Jul 27 2021
%E A346659 More terms from _Michael S. Branicky_, Jul 29 2021