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.

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

Original entry on oeis.org

4, 8, 9, 16, 22, 25, 27, 33, 44, 49, 55, 77, 88, 99, 125, 128, 155, 256, 279, 1477, 1555, 1688, 1899, 2799, 3479, 3577, 14777, 16888, 18999, 22599, 36799, 444577, 455777, 1112447, 1555555, 2555555, 2799999, 3577777, 3799999, 45577777, 124556677, 155555555555, 279999999999
Offset: 1

Views

Author

Scott R. Shannon, Apr 25 2024

Keywords

Comments

A number 155...555 will be a term if it has two prime factors 5 and 3111...111. Therefore 155555555555 and 1555555555555 are both terms. See A056704.
The next term is greater than 10^11.

Examples

			444577 is a term as 444577 = 7 * 7 * 43 * 211, and 444577 has nondecreasing digits while its prime factor concatenation "7743211" has nonincreasing digits.
		

Crossrefs

Programs

  • Python
    from sympy import factorint, isprime
    from itertools import count, 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("0123456789", d) if m[0]!="0")
    def agen(): # generator of terms
        for d in count(1):
            for s in bgen(d):
                t = int(s)
                if t < 4 or isprime(t): continue
                if ni("".join(str(p)*e for p,e in factorint(t).items())):
                    yield t
    print(list(islice(agen(), 41))) # Michael S. Branicky, Apr 26 2024

Extensions

a(42)-a(43) from Michael S. Branicky, Apr 26 2024