A276380 Irregular triangle where row n contains terms k of the partition of n produced by greedy algorithm such that all elements are in A003586.
1, 2, 3, 4, 1, 4, 6, 1, 6, 8, 9, 1, 9, 2, 9, 12, 1, 12, 2, 12, 3, 12, 16, 1, 16, 18, 1, 18, 2, 18, 3, 18, 4, 18, 1, 4, 18, 24, 1, 24, 2, 24, 27, 1, 27, 2, 27, 3, 27, 4, 27, 32, 1, 32, 2, 32, 3, 32, 36, 1, 36, 2, 36, 3, 36, 4, 36, 1, 4, 36, 6, 36, 1, 6, 36, 8, 36, 9, 36, 1, 9, 36, 2, 9, 36, 48, 1, 48
Offset: 1
Examples
Triangle begins: 1 2 3 4 1,4 6 1,6 8 9 1,9 2,9 12 1,12 2,12 3,12 16 1,16 18 1,18 2,18 3,18 4,18 1,4,18 ...
References
- V. Dimitrov, G. Jullien, and R. Muscedere, Multiple Number Base System Theory and Applications, 2nd ed., CRC Press, 2012, pp. 35-39.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..11006 (Rows 1 <= n <= 3600)
Crossrefs
Programs
-
Mathematica
Table[Reverse@ DeleteCases[Append[Abs@ Differences@ #, Last@ #], k_ /; k == 0] &@ NestWhileList[# - SelectFirst[# - Range[0, # - 1], Block[{m = #, n = 6}, While[And[m != 1, ! CoprimeQ[m, n]], n = GCD[m, n]; m = m/n]; m == 1] &] &, n, # > 1 &], {n, 49}]
-
Python
from itertools import count, takewhile N = 50 def B(p): return list(takewhile(lambda x: x<=N, (p**i for i in count(0)))) B23set = set(b*t for b in B(2) for t in B(3) if b*t <= N) B23lst = sorted(B23set, reverse=True) def row(n): if n in B23set: return [n] big = next(t for t in B23lst if t <= n) return row(n - big) + [big] print([t for r in range(1, N) for t in row(r)]) # Michael S. Branicky, Sep 14 2022
Comments