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.

A358666 Numbers such that the two numbers before and the two numbers after are squarefree semiprimes.

This page as a plain text file.
%I A358666 #14 Nov 27 2022 10:41:01
%S A358666 144,204,216,300,696,1140,1764,2604,3240,3900,4536,4764,5316,5460,
%T A358666 6000,6504,7116,7836,7860,8004,8484,9300,9864,9936,10020,11760,12180,
%U A358666 13140,13656,14256,15096,16020,16440,16860,18000,19536,20016,20136,20280,21780,22116,22236,23940
%N A358666 Numbers such that the two numbers before and the two numbers after are squarefree semiprimes.
%C A358666 All numbers in this sequence are divisible by 12. Proof: Suppose n is odd and in this sequence, then either n-1 or n+1 is divisible by 4, creating a contradiction. Suppose n is even, but not divisible by 4, then n-2 is divisible by 4, creating a contradiction. Suppose n is not divisible by 3. Then there exist x such that 3x and 3(x+1) are among squarefree semiprimes surrounding n; one of them is divisible by 6, creating a contradiction.
%e A358666 The following numbers are squarefree semiprimes: 214 = 2*107, 215 = 5*43, 217 = 7*31, and 218 = 2*109. Thus, 216 is in this sequence.
%t A358666 Select[Range[100000], Transpose[FactorInteger[# - 2]][[2]] == {1, 1} && Transpose[FactorInteger[# - 1]][[2]] == {1, 1} && Transpose[FactorInteger[# + 2]][[2]] == {1, 1} && Transpose[FactorInteger[# + 1]][[2]] == {1, 1} &]
%o A358666 (Python)
%o A358666 from itertools import count, islice
%o A358666 from sympy import isprime, factorint
%o A358666 def issfsemiprime(n): return list(factorint(n).values()) == [1, 1] if n&1 else isprime(n//2)
%o A358666 def ok(n): return all(issfsemiprime(n+i) for i in (-2, 2, -1, 1))
%o A358666 def agen(): yield from (k for k in count(12, 12) if ok(k))
%o A358666 print(list(islice(agen(), 43))) # _Michael S. Branicky_, Nov 26 2022
%Y A358666 Cf. A001358, A358657, A358665.
%K A358666 nonn
%O A358666 1,1
%A A358666 _Tanya Khovanova_ and _Massimo Kofler_, Nov 25 2022