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.

Showing 1-2 of 2 results.

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.

Original entry on oeis.org

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

Views

Author

Michael De Vlieger, Sep 25 2016

Keywords

Comments

This sequence uses a greedy algorithm f(x) to find the largest number k <= n such that k is in A003586. The function is recursively applied to the result until it reaches 1. This is the algorithm described in the reference p. 36. This sequence presents the terms in order from least to greatest term.
The reference suggests the greedy algorithm is one way to render n in a "dual-base number system", essentially base (2,3) with bases 2 and 3 arranged orthogonally to produce a matrix of places with values that are the tensor product of prime power ranges of 2 and 3. Place values are signified by 0 or 1. Thus we can boil down the matrix to simply list the values of places harboring digit 1.
Row n = n for n that are in A003586.
The reference defines a "canonic" representation of n on page 33 as having the lowest number of terms. The greedy algorithm does not always render the canonic representation. a(41) = {1,4,36}, but {9,32} is the shortest possible partition of 41 such that all terms are in A003586.
The terms in row n differ from the canonic terms at n = 41, 43, 59, 86, 88, 91, 113, 118, 123, 135, 155, 172, 176, 177, 182, 185, 209, 215, 226, 236, 239, 248... (i.e., A277071).

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.

Crossrefs

Cf. A003586, A237442 (least number of 3-smooth numbers that add up to n), A277070 (row lengths), A277071, A347860, A348599.

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

A347860 Irregular triangle T(n,k) where row n is the partition of n with the least number of 3-smooth parts such that the product of parts is minimal.

Original entry on oeis.org

1, 2, 3, 4, 4, 1, 6, 6, 1, 8, 9, 9, 1, 9, 2, 12, 12, 1, 12, 2, 12, 3, 16, 16, 1, 18, 18, 1, 18, 2, 18, 3, 18, 4, 18, 4, 1, 24, 24, 1, 24, 2, 27, 27, 1, 27, 2, 27, 3, 27, 4, 32, 32, 1, 32, 2, 32, 3, 36, 36, 1, 36, 2, 36, 3, 36, 4, 32, 9, 36, 6, 27, 16, 36, 8, 36, 9
Offset: 1

Views

Author

Michael De Vlieger, Feb 23 2022

Keywords

Comments

Let k = 2^a * 3^b be a part such that n is the sum of at least one such k. Then we may represent k at (a,b) on a Cartesian grid. In Dimitrov, et al., these k are known as "digits" in a 2-dimensional number base system. Since these partitions have the least number of parts (digits) in order to represent n, in Dimitrov this is called a "canonic form" for n in base (2,3).
These numbers represent an extreme representation where the digits tend to be spread farthest apart in the plot described above.
Additionally, this canonic representation of n is often identical to the greedy representation of n shown by row n in A276380.

Examples

			Triangle begins:
   1;
   2;
   3;
   4;
   4, 1;   (product smaller than (3,2))
   6;
   6, 1;   (product smaller than (4,3))
   8;
   9;
   9, 1;   (product least of {(9,1), (8,2), (6,4)})
   9, 2;   (product smaller than (8,3))
  12;
  ...
		

References

  • Vassil Dimitrov, Graham Jullien, and Roberto Muscedere, Multiple Number Base System Theory and Applications, 2nd ed., CRC Press (2012), 35-39.

Crossrefs

Programs

  • Mathematica
    nn = 45; ss = Union@ Flatten@ Table[2^a*3^b, {a, 0, Log2[nn]}, {b, 0, Log[3, nn/(2^a)]}]; Table[Block[{k = 1, w, t = TakeWhile[ss, # <= n &]}, While[{} == Set[w, IntegerPartitions[n, {k}, t]], k++]; MinimalBy[w, Times @@ # &][[1]]], {n, nn}] // Flatten

Formula

A237442(n) = length of row n.
Showing 1-2 of 2 results.