login
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

%I #28 Apr 27 2024 08:58:34

%S 4,8,9,16,22,25,27,33,44,49,55,77,88,99,125,128,155,256,279,1477,1555,

%T 1688,1899,2799,3479,3577,14777,16888,18999,22599,36799,444577,455777,

%U 1112447,1555555,2555555,2799999,3577777,3799999,45577777,124556677,155555555555,279999999999

%N 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.

%C 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.

%C The next term is greater than 10^11.

%H Michael S. Branicky, <a href="/A372280/b372280.txt">Table of n, a(n) for n = 1..64</a> (all terms <= 20 digits)

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

%o (Python)

%o from sympy import factorint, isprime

%o from itertools import count, islice, combinations_with_replacement as mc

%o def ni(s): return s == "".join(sorted(s, reverse=True))

%o def bgen(d):

%o yield from ("".join(m) for m in mc("0123456789", d) if m[0]!="0")

%o def agen(): # generator of terms

%o for d in count(1):

%o for s in bgen(d):

%o t = int(s)

%o if t < 4 or isprime(t): continue

%o if ni("".join(str(p)*e for p,e in factorint(t).items())):

%o yield t

%o print(list(islice(agen(), 41))) # _Michael S. Branicky_, Apr 26 2024

%Y Cf. A372308, A372034, A056704, A372029, A372055, A027746, A372249.

%K nonn,base

%O 1,1

%A _Scott R. Shannon_, Apr 25 2024

%E a(42)-a(43) from _Michael S. Branicky_, Apr 26 2024