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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

144, 204, 216, 300, 696, 1140, 1764, 2604, 3240, 3900, 4536, 4764, 5316, 5460, 6000, 6504, 7116, 7836, 7860, 8004, 8484, 9300, 9864, 9936, 10020, 11760, 12180, 13140, 13656, 14256, 15096, 16020, 16440, 16860, 18000, 19536, 20016, 20136, 20280, 21780, 22116, 22236, 23940
Offset: 1

Views

Author

Tanya Khovanova and Massimo Kofler, Nov 25 2022

Keywords

Comments

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.

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    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} &]
  • 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, -1, 1))
    def agen(): yield from (k for k in count(12, 12) if ok(k))
    print(list(islice(agen(), 43))) # Michael S. Branicky, Nov 26 2022

A358686 Numbers sandwiched between two semiprimes, one of which is a square.

Original entry on oeis.org

5, 50, 120, 122, 288, 290, 528, 842, 960, 1370, 1680, 1850, 2808, 2810, 4488, 5328, 5330, 6240, 6242, 6888, 6890, 9408, 9410, 11880, 12768, 18770, 22200, 22800, 26568, 27888, 36482, 38808, 39600, 52440, 54290, 58080, 63000, 63002, 69170, 72360, 72362, 73442, 76730, 78960
Offset: 1

Views

Author

Tanya Khovanova, Nov 26 2022

Keywords

Comments

Numbers in A124936 but not in A358665.
All numbers except 5 (the first term) are even.
Subsequence of A124936.

Examples

			5 is sandwiched between two semiprimes 4 = 2*2 and 6 = 3*2, one of which is a square. Thus, 5 is in this sequence.
34 is sandwiched between squarefree semiprimes 33 = 3*11 and 35 = 5*7. Thus, 34 is not in this sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100000], Total[Transpose[FactorInteger[# - 1]][[2]]] == 2 && Total[Transpose[FactorInteger[# + 1]][[2]]] == 2 && ! (Transpose[FactorInteger[# - 1]][[2]] == {1, 1} && Transpose[FactorInteger[# + 1]][[2]] == {1, 1}) &]
    Mean/@Select[SequencePosition[PrimeOmega[Range[80000]],{2,,2}],AnyTrue[Sqrt[#],IntegerQ]&] (* _Harvey P. Dale, Jun 14 2023 *)
  • Python
    from sympy import factorint
    from itertools import count, islice
    def agen(): # generator of terms
        nxt = []
        yield 5
        for k in count(6, 2):
            prv, nxt = nxt, list(factorint(k+1).values())
            if (prv==[1, 1] and nxt==[2]) or (prv==[2] and nxt==[1, 1]): yield k
    print(list(islice(agen(), 44))) # Michael S. Branicky, Nov 26 2022
Showing 1-2 of 2 results.