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.

A260143 Runs of consecutive integers with same prime signature.

Original entry on oeis.org

2, 3, 14, 15, 21, 22, 33, 34, 35, 38, 39, 44, 45, 57, 58, 75, 76, 85, 86, 87, 93, 94, 95, 98, 99, 116, 117, 118, 119, 122, 123, 133, 134, 135, 136, 141, 142, 143, 145, 146, 147, 148, 158, 159, 171, 172, 177, 178, 201, 202, 203, 205, 206, 213, 214, 215, 217, 218, 219, 230, 231, 244, 245
Offset: 1

Views

Author

Jean-François Alcover, Jul 17 2015

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

Examples

			Runs begin:
(terms)         (prime signature)
{2, 3},         [1]
{14, 15},       [1,1]
{21, 22},       [1,1]
{33, 34, 35},   [1,1]
{38, 39},       [1,1]
{44, 45},       [1,2]
{57, 58},       [1,1]
{75, 76},       [1,2]
{85, 86, 87},   [1,1]
{93, 94, 95},   [1,1]
{98, 99},       [1,2]
...
		

Crossrefs

Main sequence is A052213.

Programs

  • Mathematica
    Split[Range[2,250], Sort[FactorInteger[#1][[All, 2]]] === Sort[FactorInteger[#2][[All, 2]]]&] // Select[#, Length[#] > 1&]& // Flatten
  • PARI
    is(n)=my(f=vecsort(factor(n)[,2])); f==vecsort(factor(n-1)[,2]) || f==vecsort(factor(n+1)[,2]) \\ Charles R Greathouse IV, Jul 17 2015
    
  • Python
    from sympy import factorint
    def aupto(limit):
        aset, prevsig = {2}, [1]
        for k in range(3, limit+2):
            sig = sorted(factorint(k).values())
            if sig == prevsig: aset.update([k - 1, k])
            prevsig = sig
        return sorted(aset)
    print(aupto(250)) # Michael S. Branicky, Sep 20 2021