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.

A372034 For a positive number k, let L(k) denote the list consisting of k followed by the prime factors of k, with repetition, in nondecreasing order; sequence gives composite k such that the digits of L(k) are in nonincreasing order.

Original entry on oeis.org

4, 8, 9, 22, 32, 33, 44, 55, 64, 77, 88, 93, 99, 422, 633, 775, 844, 933, 993, 4222, 4442, 6333, 6655, 6663, 7533, 7744, 7775, 8444, 8884, 9663, 9993, 44222, 66333, 88444, 99633, 99933, 99993, 933333, 966333, 996663, 999993, 4442222, 6663333, 7777775, 8884444, 9663333, 9666633, 9666663
Offset: 1

Views

Author

Scott R. Shannon, Apr 16 2024

Keywords

Comments

Is it true that no terms end with 1? A separate search on those shows none with < 70 digits. Michael S. Branicky, Apr 23 2024
Testing all products of repunit primes (A004022, A004023), there are no terms ending in 1 less than 10^3000. - Michael S. Branicky, Apr 24 2024

Examples

			The initial terms and their factorizations are:
4 = [2, 2]
8 = [2, 2, 2]
9 = [3, 3]
22 = [2, 11]
32 = [2, 2, 2, 2, 2]
33 = [3, 11]
44 = [2, 2, 11]
55 = [5, 11]
64 = [2, 2, 2, 2, 2, 2]
77 = [7, 11]
88 = [2, 2, 2, 11]
93 = [3, 31]
99 = [3, 3, 11]
422 = [2, 211]
633 = [3, 211]
775 = [5, 5, 31]
844 = [2, 2, 211]
933 = [3, 311]
993 = [3, 331]
4222 = [2, 2111]
4442 = [2, 2221]
6333 = [3, 2111]
6655 = [5, 11, 11, 11]
6663 = [3, 2221]
7533 = [3, 3, 3, 3, 3, 31]
7744 = [2, 2, 2, 2, 2, 2, 11, 11]
...
		

Crossrefs

Programs

  • Python
    from sympy import factorint, isprime
    def ni(s): return sorted(s, reverse=True) == list(s)
    def ok(n):
        if n < 4 or isprime(n): return False
        s, f = str(n), "".join(str(p)*e for p, e in factorint(n).items())
        return ni(s+f)
    print([k for k in range(10**6) if ok(k)]) # Michael S. Branicky, Apr 23 2024
    
  • Python
    # faster for initial segment of sequence
    from sympy import factorint, isprime
    from itertools import islice, combinations_with_replacement as mc
    def ni(s): return s == "".join(sorted(s, reverse=True))
    def bgen(d):
        yield from ("".join(m) for m in mc("987654321", d))
    def agen(): # generator of terms
        for d in range(1, 70):
            out = set()
            for s in bgen(d):
                t = int(s)
                if t < 4 or isprime(t): continue
                if ni(s+"".join(str(p)*e for p, e in factorint(t).items())):
                    out.add(t)
            yield from sorted(out)
    print(list(islice(agen(), 50))) # Michael S. Branicky, Apr 23 2024