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.

A052213 Numbers k with prime signature(k) = prime signature(k+1).

Original entry on oeis.org

2, 14, 21, 33, 34, 38, 44, 57, 75, 85, 86, 93, 94, 98, 116, 118, 122, 133, 135, 141, 142, 145, 147, 158, 171, 177, 201, 202, 205, 213, 214, 217, 218, 230, 244, 253, 285, 296, 298, 301, 302, 326, 332, 334, 375, 381, 387, 393, 394, 429, 434, 445, 446, 453, 481
Offset: 1

Views

Author

Erich Friedman, Jan 29 2000

Keywords

Comments

This sequence is infinite, see A189982 and Theorem 4 in Goldston-Graham-Pintz-Yıldırım. - Charles R Greathouse IV, Jul 17 2015
This is a subsequence of A005237, hence a(n) >> n sqrt(log log n) by the Erdős-Pomerance-Sárközy result cited there. - Charles R Greathouse IV, Jul 17 2015
Sequence is not the same as A280074, first deviation is at a(212): a(212) = 2041, A280074(212) = 2024. Number 2024 is the smallest number n such that A007425(n) = A007425(n+1) with different prime signatures of numbers n and n+1 (2024 = 2^3 * 11 * 23, 2025 = 3^4 * 5^2; A007425(2024) = A007425(2025) = 90). Conjecture: also numbers n such that Product_{d|n} tau(d) = Product_{d|n+1} tau(d). - Jaroslav Krizek, Dec 25 2016

Examples

			14 = 2^1*7^1 and 15 = 3^1*5^1, so both have prime signature {1,1}. Thus, 14 is a term.
		

Crossrefs

Programs

  • Mathematica
    pri[n_] := Sort[ Transpose[ FactorInteger[n]] [[2]]]; Select[ Range[ 2, 1000], pri[#] == pri[#+1] &]
    Rest[SequencePosition[Table[Sort[FactorInteger[n][[All,2]]],{n,500}],{x_,x_}][[All,1]]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 28 2017 *)
  • PARI
    lista(nn) = for (n=1, nn-1, if (vecsort(factor(n)[,2]) == vecsort(factor(n+1)[,2]), print1(n, ", "));); \\ Michel Marcus, Jun 10 2015
    
  • Python
    from sympy import factorint
    def aupto(limit):
        alst, prevsig = [], [1]
        for k in range(3, limit+2):
            sig = sorted(factorint(k).values())
            if sig == prevsig: alst.append(k - 1)
            prevsig = sig
        return alst
    print(aupto(250)) # Michael S. Branicky, Sep 20 2021

A346549 Runs (of length > 1) of consecutive squarefree semiprimes.

Original entry on oeis.org

14, 15, 21, 22, 33, 34, 35, 38, 39, 57, 58, 85, 86, 87, 93, 94, 95, 118, 119, 122, 123, 133, 134, 141, 142, 143, 145, 146, 158, 159, 177, 178, 201, 202, 203, 205, 206, 213, 214, 215, 217, 218, 219, 253, 254, 298, 299, 301, 302, 303, 326, 327, 334, 335, 381, 382, 393, 394, 395, 445, 446, 447, 453, 454, 481, 482
Offset: 1

Views

Author

Ositadima Chukwu, Sep 16 2021

Keywords

Comments

Runs of length bigger than 3 are impossible as one of four consecutive numbers is divisible by 4.
The existence of consecutive pairs of such numbers is connected with primes of the form (p*q +- 1)/2 where p and q are odd primes.
From Michael S. Branicky, Sep 21 2021: (Start)
This only differs from the supersequence A038456 in the terms 26, 27 (present there but not here).
Proof. Numbers with 4 divisors are of the form p*q for p, q prime, p != q or of the form r^3 for r prime. For two such numbers to be consecutive terms of A038456 (but not terms here) requires p*q + 1 = r^3 or p*q = r^3 + 1 for primes p, q, r, p != q. There is no solution to either form with p, q distinct primes for r = 2. Thus, r^3 is odd and p*q must be even, so wlog p = 2. Thus, we need to solve for case 1: 2*q + 1 = r^3 for q, r prime. But r^3 - 1 = (r - 1)*(r^2 + r + 1), so r = 3 is the only prime solution producing the factor 2, leading to the pair 26, 27. Likewise, case 2: r^3 + 1 = (r + 1)*(r^2 - r + 1) has no solution with prime r producing the required factor 2. (End)

Examples

			14 and 15 are consecutive and both have prime signature {1, 1}
		

Crossrefs

Intersection of A006881 and A260143.
Subsequence of A038456.

Programs

  • Mathematica
    s = Union@ Flatten@ Table[Prime[m] Prime[n], {n, Log2[#/3]}, {m, n + 1, PrimePi[#/Prime[n]]}] &[482]; s[[Flatten@ Map[Append[#, Last[#] + 1] &, Position[Differences[s], 1]]]] (* Michael De Vlieger, Oct 28 2021 *)
    With[{sp=If[SquareFreeQ[#]&&PrimeOmega[#]==2,1,0]&/@Range[ 500]},DeleteDuplicates[ Flatten[SequencePosition[sp,{1,1}]]]] (* Harvey P. Dale, Jul 29 2022 *)
  • PARI
    consecutive(n)=my(f=vecsort(factor(n)[, 2])); f==vecsort(factor(n-1)[, 2]) || f==vecsort(factor(n+1)[, 2]) \\  based on A260143
    squarefree_semiprime(n)=(bigomega(n)==2&&omega(n)==2) \\ based on A006881
    for(n=1, 500, if(squarefree_semiprime(n) && consecutive(n), print1(n, ", ")))
    
  • Python
    from sympy import factorint
    def aupto(limit):
        aset, prevsig = set(), [1]
        for k in range(3, limit+2):
            sig = sorted(factorint(k).values())
            if sig == prevsig == [1, 1]: aset.update([k - 1, k])
            prevsig = sig
        return sorted(aset)
    print(aupto(482)) # Michael S. Branicky, Sep 20 2021
Showing 1-2 of 2 results.