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-3 of 3 results.

A026791 Triangle in which n-th row lists juxtaposed lexicographically ordered partitions of n; e.g., the partitions of 3 (1+1+1,1+2,3) appear as 1,1,1,1,2,3 in row 3.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 2, 1, 3, 2, 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 2, 2, 1, 4, 2, 3, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 4, 1, 2, 3, 1, 5, 2, 2, 2, 2, 4, 3, 3, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 1, 4, 1, 1, 2, 3, 1, 1, 5
Offset: 1

Views

Author

Keywords

Comments

Differs from A080576 in a(18): Here, (...,1+3,2+2,4), there (...,2+2,1+3,4).
The representation of the partitions (for fixed n) is as (weakly) increasing lists of parts, the order between individual partitions (for the same n) is lexicographic (see example). - Joerg Arndt, Sep 03 2013
The equivalent sequence for compositions (ordered partitions) is A228369. - Omar E. Pol, Oct 19 2019

Examples

			First six rows are:
[[1]];
[[1, 1], [2]];
[[1, 1, 1], [1, 2], [3]];
[[1, 1, 1, 1], [1, 1, 2], [1, 3], [2, 2], [4]];
[[1, 1, 1, 1, 1], [1, 1, 1, 2], [1, 1, 3], [1, 2, 2], [1, 4], [2, 3], [5]];
[[1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 2], [1, 1, 1, 3], [1, 1, 2, 2], [1, 1, 4], [1, 2, 3], [1, 5], [2, 2, 2], [2, 4], [3, 3], [6]];
...
From _Omar E. Pol_, Sep 03 2013: (Start)
Illustration of initial terms:
----------------------------------
.                     Ordered
n  j      Diagram     partition j
----------------------------------
.               _
1  1           |_|    1;
.             _ _
2  1         | |_|    1, 1,
2  2         |_ _|    2;
.           _ _ _
3  1       | | |_|    1, 1, 1,
3  2       | |_ _|    1, 2,
3  3       |_ _ _|    3;
.         _ _ _ _
4  1     | | | |_|    1, 1, 1, 1,
4  2     | | |_ _|    1, 1, 2,
4  3     | |_ _ _|    1, 3,
4  4     |   |_ _|    2, 2,
4  5     |_ _ _ _|    4;
...
(End)
		

Crossrefs

Row lengths are given in A006128.
Partition lengths are in A193173.
Row lengths are A000041.
Partition sums are A036042.
Partition minima are A196931.
Partition maxima are A194546.
The reflected version is A211992.
The length-sensitive version (sum/length/lex) is A036036.
The colexicographic version (sum/colex) is A080576.
The version for non-reversed partitions is A193073.
Compositions under the same ordering (sum/lex) are A228369.
The reverse-lexicographic version (sum/revlex) is A228531.
The Heinz numbers of these partitions are A334437.

Programs

  • Maple
    T:= proc(n) local b, ll;
          b:= proc(n,l)
                if n=0 then ll:= ll, l[]
              else seq(b(n-i, [l[], i]), i=`if`(l=[],1,l[-1])..n)
                fi
              end;
          ll:= NULL; b(n, []); ll
        end:
    seq(T(n), n=1..8);  # Alois P. Heinz, Jul 16 2011
  • Mathematica
    T[n0_] := Module[{b, ll}, b[n_, l_] := If[n == 0, ll = Join[ll, l], Table[ b[n - i, Append[l, i]], {i, If[l == {}, 1, l[[-1]]], n}]]; ll = {}; b[n0, {}]; ll]; Table[T[n], {n, 1, 8}] // Flatten (* Jean-François Alcover, Aug 05 2015, after Alois P. Heinz *)
    Table[DeleteCases[Sort@PadRight[Reverse /@ IntegerPartitions[n]], x_ /; x == 0, 2], {n, 7}] // Flatten (* Robert Price, May 18 2020 *)
  • Python
    t = [[[]]]
    for n in range(1, 10):
        p = []
        for minp in range(1, n):
            p += [[minp] + pp for pp in t[n-minp] if min(pp) >= minp]
        t.append(p + [[n]])
    print(t)
    # Andrey Zabolotskiy, Oct 18 2019

A095904 Triangular array of natural numbers (greater than 1) arranged by prime signature.

Original entry on oeis.org

2, 3, 4, 5, 9, 6, 7, 25, 10, 8, 11, 49, 14, 27, 12, 13, 121, 15, 125, 18, 16, 17, 169, 21, 343, 20, 81, 24, 19, 289, 22, 1331, 28, 625, 40, 30, 23, 361, 26, 2197, 44, 2401, 54, 42, 32, 29, 529, 33, 4913, 45, 14641, 56, 66, 243, 36, 31, 841, 34, 6859, 50, 28561, 88, 70
Offset: 0

Views

Author

Alford Arnold, Jul 10 2004

Keywords

Comments

The unit, 1, has the empty prime signature { } (thus not in triangle).
Downwards diagonals:
* Rightmost diagonal: smallest numbers of a given prime signature in increasing order (A025487). This defines the order of signatures used.
This special ordering of prime signatures (by increasing smallest numbers of a given prime signature, A181087) is unrelated to any of the 8 variants of graded lexicographic or colexicographic orderings (based on the exponents only) since it depends on the magnitudes of the prime numbers. It is not even graded by Omega(n).
* Second rightmost diagonal: second smallest numbers of a given prime signature (A077560). (They are not increasing anymore.)
Upwards diagonals:
* Leftmost diagonal: primes. {1} (A000040)
* 2nd leftmost diagonal: squares of primes. {2} (A001248)
* 3rd leftmost diagonal: squarefree biprimes. {1,1} (A006881)
* 4th leftmost diagonal: cubes of primes. {3} (A030078)
* 5th leftmost diagonal: signature (Achilles numbers) {1,2} (A054753)
* 6th leftmost diagonal: fourth powers of primes. {4} (A030514)
* 7th leftmost diagonal: signature (Achilles numbers) {1,3} (A065036)
* 8th leftmost diagonal: squarefree triprimes. {1,1,1} (A007304)
The Achilles numbers are nonsquarefree while not perfect powers.
Prime signatures are often expressed in increasing order of exponents. The decreasing order of exponents (as on the Wiki page, see links) has the advantage of listing the exponents in the same order (with the canonical factorization convention) as the smallest number of a given prime signature.

Examples

			343 is in the 4th left- and 4th rightmost diagonal, because it is the 4th value with the 4th prime signature {3}.
First 8 rows of triangular array (Cf. table link for this sequence):
                                   2
                              3         4
                         5         9         6
                    7        25        10         8
               11       49        14        27        12
          13      121        15       125        18        16
     17       169       21       343        20        81        24
19       289       22       1331       28       625        40        30
		

Crossrefs

Extensions

Extended by Ray Chandler, Jul 31 2004
Corrected (minor) by Daniel Forgues, Jan 21 2011
Example, comments by Daniel Forgues, Jan 21 2011
Edited by Alois P. Heinz, Jan 23 2011
Edited by Daniel Forgues, Jan 23 2011

A181317 Triangle in which n-th row lists all partitions of n, in the order of increasing smallest numbers of prime signatures.

Original entry on oeis.org

1, 2, 1, 1, 3, 2, 1, 1, 1, 1, 4, 3, 1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 5, 4, 1, 3, 2, 3, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 6, 5, 1, 4, 2, 3, 3, 4, 1, 1, 3, 2, 1, 3, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 6, 1, 5, 2, 4, 3, 5, 1, 1, 4, 2, 1, 3, 3, 1, 4, 1, 1, 1, 3, 2, 2, 3, 2, 1, 1, 2
Offset: 1

Views

Author

Alois P. Heinz, Jan 26 2011

Keywords

Comments

The parts of each partition are listed in decreasing order.
Differs from A080577 at a(48) and from A036037 at a(56). A181087 uses the same order for all partitions.

Examples

			[3,1,1,1] and [2,2,2] are both partitions of 6, the smallest numbers having these prime signatures are 2^3*3^1*5^1*7^1=840 and 2^2*3^2*5^2=900, thus [3,1,1,1] < [2,2,2] in this order.
Triangle begins:
  [1];
  [2], [1,1];
  [3], [2,1], [1,1,1];
  [4], [3,1], [2,2], [2,1,1], [1,1,1,1];
  [5], [4,1], [3,2], [3,1,1], [2,2,1], [2,1,1,1], [1,1,1,1,1];
  [6], [5,1], [4,2], [3,3], [4,1,1], [3,2,1], [3,1,1,1], [2,2,2];
  ...
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local b, ll;  # gives all parts of partitions of row n
      b:= proc(n,i,l)
            if n<0 then
          elif n=0 then ll:= ll, [mul(ithprime(t)^l[t], t=1..nops(l)), l]
          elif i=0 then
          else b(n-i, i, [l[], i]), b(n, i-1, l)
            fi
      end;
      ll:= NULL; b(n,n,[]);
      map(h-> h[2][], sort([ll], (x,y)-> x[1]
    				
  • Mathematica
    f[P_] := Times @@ (Prime[Range[Length[P]]]^P);
    row[n_] := SortBy[IntegerPartitions[n], f];
    Array[row, 7] // Flatten (* Jean-François Alcover, Feb 16 2021 *)
Showing 1-3 of 3 results.