A372029
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 nondecreasing order.
Original entry on oeis.org
12, 25, 35, 111, 112, 125, 222, 245, 333, 335, 445, 1225, 2225, 11125, 33445, 334445, 3333335, 3334445, 3444445, 33333445, 333333335, 334444445, 3333333335, 33333334445, 333333333335, 33333333334445, 33333333444445, 444444444444445, 2222222222222225, 11111111111111125
Offset: 1
The initial terms and their factorizations are:
12 = [2, 2, 3]
25 = [5, 5]
35 = [5, 7]
111 = [3, 37]
112 = [2, 2, 2, 2, 7]
125 = [5, 5, 5]
222 = [2, 3, 37]
245 = [5, 7, 7]
333 = [3, 3, 37]
335 = [5, 67]
445 = [5, 89]
1225 = [5, 5, 7, 7]
2225 = [5, 5, 89]
11125 = [5, 5, 5, 89]
33445 = [5, 6689]
334445 = [5, 66889]
3333335 = [5, 666667]
3334445 = [5, 666889]
3444445 = [5, 688889]
33333445 = [5, 6666689]
333333335 = [5, 66666667]
334444445 = [5, 66888889]
...
12 is a term since the list L(12) is [12,2,2,3], in which the digits 1,2,2,2,3 are in nondecreasing order.
121 is not a term since L(121) = [121,11,11], and the digits 1,2,1,1,1,1,1 are not in nondecreasing order.
-
from sympy import factorint, isprime
def nd(s): return sorted(s) == 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 nd(s+f)
print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Apr 22 2024
-
# faster for initial segment of sequence
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): # can't end in 8 or 9
yield from ("".join(m) for m in mc("1234567", d))
def agen(): # generator of terms
for d in count(2):
for s in bgen(d):
t = int(s)
if any(s[-1] > c and t%int(c) == 0 for c in "2357"): continue
if isprime(t): continue
if nd(s+"".join(str(p)*e for p, e in factorint(t).items())):
yield t
print(list(islice(agen(), 25))) # Michael S. Branicky, Apr 22 2024
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
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]
...
-
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
-
# 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
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
444577 is a term as 444577 = 7 * 7 * 43 * 211, and 444577 has nondecreasing digits while its prime factor concatenation "7743211" has nonincreasing digits.
-
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
A372308
Composite numbers k such that the digits of k are in nonincreasing order while the digits of the concatenation of k's ascending order prime factors, with repetition, are in nondecreasing order.
Original entry on oeis.org
4, 6, 8, 9, 10, 20, 21, 30, 32, 40, 42, 50, 54, 60, 63, 64, 70, 72, 74, 75, 80, 81, 84, 90, 92, 94, 96, 98, 100, 111, 200, 210, 222, 300, 320, 333, 400, 420, 432, 441, 444, 500, 531, 540, 553, 554, 600, 611, 630, 632, 640, 666, 700, 711, 720, 750, 752, 800, 810, 840, 851, 864, 871, 875, 882
Offset: 1
42 is a term as 42 = 2 * 3 * 7, and 42 has nonincreasing digits while its prime factor concatenation "237" has nondecreasing digits.
-
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
if nd("".join(str(p)*e for p,e in factorint(t).items())):
out.add(t)
yield from sorted(out)
print(list(islice(agen(), 65))) # Michael S. Branicky, Apr 26 2024
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
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.
-
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
A372151
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 k is either 3, 4 or 5 and the digits of L(k) are in nondecreasing order.
Original entry on oeis.org
35, 333, 335, 445, 33445, 334445, 3333335, 3334445, 3444445, 33333445, 333333335, 334444445, 3333333335, 33333334445, 333333333335, 33333333334445, 33333333444445, 444444444444445, 333333334444444445, 333334444444444445, 444444444444444445, 3333333333333444445
Offset: 1
35 = 5*7
333 = 3*3*37
335 = 5*67
445 = 5*89
33445 = 5*6689
333333333333333333333333444444444444444444444445 = 5*66666666666666666666666688888888888888888888889
-
from itertools import count, islice, combinations_with_replacement
from sympy import isprime, factorint
def A372151_gen(): # generator of terms
for l in count(1):
for d in combinations_with_replacement('345',l):
a, n = d[-1], int(''.join(d))
if not isprime(n):
for p in factorint(n,multiple=True):
s = str(p)
if s[0] < a or sorted(s) != list(s):
break
a = s[-1]
else:
yield n
A372151_list = list(islice(A372151_gen(),20))
Showing 1-6 of 6 results.
Comments