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.

A372295 Composite numbers k such that k's prime factors are distinct, the digits of k are in nonincreasing order while the digits of the concatenation of k's ascending order prime factors are in nondecreasing order.

Original entry on oeis.org

6, 10, 21, 30, 42, 70, 74, 94, 111, 210, 222, 553, 554, 611, 851, 871, 885, 998, 5530, 5554, 7751, 8441, 8655, 9998, 85511, 95554, 99998, 9999998, 77744411, 5555555554, 7777752221, 8666666655, 755555555554, 95555555555554, 999999999999998, 5555555555555554, 8666666666666655, 755555555555555554
Offset: 1

Views

Author

Scott R. Shannon, Apr 25 2024

Keywords

Comments

A number 999...9998 will be a term if it has two prime factors 2 and 4999...999. Therefore 999999999999998 and 999...9998 (with 54 9's) are both terms. See A056712.
The next term is greater than 10^11.

Examples

			77744411 is a term as 77744411 = 233 * 333667 which has distinct prime factors, 77744411 has nonincreasing digits while its prime factor concatenation "233333667" has nondecreasing digits.
		

Crossrefs

Programs

  • Python
    from sympy import factorint, isprime
    from itertools import count, islice, combinations_with_replacement as mc
    def nd(s): return s == "".join(sorted(s))
    def bgen(d):
        yield from ("".join(m) for m in mc("9876543210", d) if m[0]!="0")
    def agen(): # generator of terms
        for d in count(1):
            out = set()
            for s in bgen(d):
                t = int(s)
                if t < 4 or isprime(t): continue
                f = factorint(t)
                if len(f) < sum(f.values()): continue
                if nd("".join(str(p) for p in f)):
                    out.add(t)
            yield from sorted(out)
    print(list(islice(agen(), 29))) # Michael S. Branicky, Apr 26 2024

Extensions

a(33)-a(38) from Michael S. Branicky, Apr 26 2024