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.

A358657 Numbers such that the three numbers before and the three numbers after are squarefree semiprimes.

Original entry on oeis.org

216, 143100, 194760, 206136, 273420, 684900, 807660, 1373940, 1391760, 1516536, 1591596, 1611000, 1774800, 1882980, 1891764, 2046456, 2051496, 2163420, 2163960, 2338056, 2359980, 2522520, 2913840, 3108204, 4221756, 4297320, 4334940, 4866120, 4988880, 5108796, 5247144, 5606244, 5996844
Offset: 1

Views

Author

Tanya Khovanova and Massimo Kofler, Nov 25 2022

Keywords

Comments

All numbers in this sequence are divisible by 36. Proof: Suppose k is odd and in this sequence; then either k-1 or k-3 is divisible by 4, creating a contradiction. Suppose k is even, but not divisible by k; then k-2 is divisible by 4, creating a contradiction. Suppose k is not divisible by 3. Then there exists a number j such that 3*j and 3*(j+1) are among squarefree semiprimes surrounding k; one of them is divisible by 6, creating a contradiction. Suppose k is divisible by 3, but not by 9; then one of the squarefree semiprimes k-3 or k+3 is divisible by 9, creating a contradiction.
Since each term k is divisible by 36, it follows that (k-3)/3, (k-2)/2, (k+2)/2, and (k+3)/3 are primes. Additionally, none of the six integers nearest to k can be the cube of a prime: for any prime p > 3, p^3 == {+-1, +-17} (mod 36), so only k-1 or k+1 could be the cube of a prime, yet in either of those cases, that cube's two nearest neighbors, p^3 - 1 and p^3 + 1, would both be factorable (i.e., p^3 - 1 = (p^2 + p + 1)*(p - 1) and p^3 + 1 = (p^2 - p + 1)*(p + 1)), and neither would be a semiprime. Thus, since neither k-1 nor k+1 can be the cube of a prime, testing whether each has four divisors (see the Magma code below) is equivalent to testing whether each is a squarefree semiprime. - Jon E. Schoenfield, Nov 26 2023
Iannucci (2004-2005) called the three numbers before each term and the three numbers after each term "almost prime triplet twins" (APTTs for short), gave the 6 terms that are smaller than 10^6, and found that there are 882 terms below 10^9. - Amiram Eldar, Nov 21 2024

Examples

			The following numbers are squarefree semiprimes: 213 = 3*71, 214 = 2*107, 215 = 5*43, 217 = 7*31, 218 = 2*109, and 219 = 3*73. Thus, 216 is in this sequence.
		

Crossrefs

Programs

  • Magma
    a:=[];
    IsP:=IsPrime;
    Tau:=NumberOfDivisors;
    for m in [1..170000] do
       t:=36*m;
       if IsP((t-3) div 3)
             and IsP((t+3) div 3)
             and IsP((t-2) div 2)
             and IsP((t+2) div 2)
             and Tau(t-1) eq 4
             and Tau(t+1) eq 4 then
          a:=a cat [t];
       end if;
    end for;
    a; // Jon E. Schoenfield, Nov 26 2023
    
  • Maple
    N:= 10^6: # for terms <= N
    P:= select(isprime, [2,seq(i,i=3..N/2,2)]):
    S:= NULL:
    for i from 1 to nops(P) do
      p:= P[i];
      r:= ListTools:-BinaryPlace(P,N/p);
      if r <= i then break fi;
      S:= S, op(p * P[i+1 .. r]);
    od:
    S:= sort([S]):
    J:= select(t -> S[t+5] = S[t]+6, [$1..nops(S)-5]):
    map(t -> S[t+2]+1, J); # Robert Israel, Nov 26 2023
  • Mathematica
    Select[Range[10000000],Transpose[FactorInteger[# - 3]][[2]] == {1, 1} && Transpose[FactorInteger[# - 2]][[2]] == {1, 1} && Transpose[FactorInteger[# - 1]][[2]] == {1, 1} && Transpose[FactorInteger[# + 3]][[2]] == {1, 1} && Transpose[FactorInteger[# + 2]][[2]] == {1, 1} && Transpose[FactorInteger[# + 1]][[2]] == {1, 1} &]
    36*Flatten@Position[({1, 1}==Last@Transpose@FactorInteger@# &/@ {#-3,#-2,#-1,#+1,#+2,#+3}) & /@ (36*Range@(10^6)), {True ..}] (* Hans Rudolf Widmer, Aug 01 2024 *)
  • PARI
    is(k) = if(k < 4, 0, my(d = [-3, -2, -1, 1, 2, 3]); for(i = 1, #d, if(factor(k+d[i])[,2] != [1,1]~, return(0))); 1); \\ Amiram Eldar, Nov 21 2024
  • Python
    from itertools import count, islice
    from sympy import isprime, factorint
    def issfsemiprime(n): return list(factorint(n).values()) == [1, 1] if n&1 else isprime(n//2)
    def ok(n): return all(issfsemiprime(n+i) for i in (-2, 2, -3, -1, 1, 3))
    def agen(): yield from (k for k in count(36, 36) if ok(k))
    print(list(islice(agen(), 20))) # Michael S. Branicky, Nov 26 2022
    

Formula

a(n) = 2*(A158476(n) + 1). - Hugo Pfoertner, Dec 12 2022