login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
7
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,1
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.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..64 (all terms <= 20 digits)
EXAMPLE
444577 is a term as 444577 = 7 * 7 * 43 * 211, and 444577 has nondecreasing digits while its prime factor concatenation "7743211" has nonincreasing digits.
PROG
(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
KEYWORD
nonn,base
AUTHOR
Scott R. Shannon, Apr 25 2024
EXTENSIONS
a(42)-a(43) from Michael S. Branicky, Apr 26 2024
STATUS
approved