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.

Previous Showing 31-34 of 34 results.

A344088 Flattened tetrangle of reversed strict integer partitions sorted first by sum, then colexicographically.

Original entry on oeis.org

1, 2, 1, 2, 3, 1, 3, 4, 2, 3, 1, 4, 5, 1, 2, 3, 2, 4, 1, 5, 6, 1, 2, 4, 3, 4, 2, 5, 1, 6, 7, 1, 3, 4, 1, 2, 5, 3, 5, 2, 6, 1, 7, 8, 2, 3, 4, 1, 3, 5, 4, 5, 1, 2, 6, 3, 6, 2, 7, 1, 8, 9, 1, 2, 3, 4, 2, 3, 5, 1, 4, 5, 1, 3, 6, 4, 6, 1, 2, 7, 3, 7, 2, 8, 1, 9, 10
Offset: 0

Views

Author

Gus Wiseman, May 12 2021

Keywords

Comments

The zeroth row contains only the empty partition.
A tetrangle is a sequence of finite triangles.

Examples

			Tetrangle begins:
  0: ()
  1: (1)
  2: (2)
  3: (12)(3)
  4: (13)(4)
  5: (23)(14)(5)
  6: (123)(24)(15)(6)
  7: (124)(34)(25)(16)(7)
  8: (134)(125)(35)(26)(17)(8)
  9: (234)(135)(45)(126)(36)(27)(18)(9)
		

Crossrefs

Positions of first appearances are A015724.
Triangle sums are A066189.
The non-strict version is A080576.
Taking lex instead of colex gives A246688 (non-reversed: A344086).
The non-reversed version is A344087.
Taking revlex instead of colex gives A344089 (non-reversed: A118457).
A026793 gives reversed strict partitions in A-S order (sum/length/lex).
A319247 sorts strict partitions by Heinz number.
A329631 sorts reversed strict partitions by Heinz number.
A344090 gives strict partitions in A-S order (sum/length/lex).

Programs

  • Mathematica
    colex[f_,c_]:=OrderedQ[PadRight[{Reverse[f],Reverse[c]}]];
    Table[Sort[Reverse/@Select[IntegerPartitions[n],UnsameQ@@#&],colex],{n,0,10}]

A382255 Heinz number of the partition corresponding to run lengths in the bits of n.

Original entry on oeis.org

1, 2, 4, 3, 6, 8, 6, 5, 10, 12, 16, 12, 9, 12, 10, 7, 14, 20, 24, 18, 24, 32, 24, 20, 15, 18, 24, 18, 15, 20, 14, 11, 22, 28, 40, 30, 36, 48, 36, 30, 40, 48, 64, 48, 36, 48, 40, 28, 21, 30, 36, 27, 36, 48, 36, 30, 25, 30, 40, 30, 21, 28, 22, 13, 26, 44, 56, 42
Offset: 0

Views

Author

M. F. Hasler and Ali Sada, Mar 19 2025

Keywords

Comments

The run lengths (number of consecutive bits that are equal) in the binary numbers in [2^(L-1), 2^L-1], i.e., of bit length L, yield all possible compositions of L, i.e., the partitions with any possible order of the parts.
Associated to any composition (p1, ..., pK) is their Heinz number prime(p1)*...*prime(pK) which depends only on the partition, i.e., not on the order of the parts.
The sequence can also be read as a table with row lengths 1, 1, 2, 4, 8, 16, 32, ... (= A011782), where row L = 0, 1, 2, 3, ... lists the 2^(L-1) compositions of L through their Heinz numbers (which will appear more than once if they contain at least two distinct parts).

Examples

			   n | binary | partition | a(n) = Heinz number
  ---+--------+-----------+--------------------
   0 |   (0)  | empty sum | 1 = empty product
   1 |     1  |     1     | 2 = prime(1)
   2 |    10  |    1+1    | 4 = prime(1) * prime(1)
   3 |    11  |     2     | 3 = prime(2)
   4 |   100  |    1+2    | 6 = prime(1) * prime(2)
   5 |   101  |   1+1+1   | 8 = 2^3 = prime(1) * prime(1) * prime(1)
   6 |   110  |    2+1    | 6 = prime(2) * prime(1)
   7 |   111  |     3     | 5 = prime(3)
   8 |  1000  |    1+3    | 10 = 2*5 = prime(1) * prime(3)
   9 |  1001  |   1+2+1   | 12 = 2^2*3 = prime(1) * prime(2) * prime(1)
  ...|   ...  |    ...    | ...
For example, n = 4 = 100[2] (in binary) has run lengths (1, 2), namely: one bit 1 followed by two bits 0. This gives a(4) = prime(1)*prime(2) = 6.
Next, n = 5 = 101[2] (in binary) has run lengths (1, 1, 1): one bit 1, followed by one bit 0, followed by one bit 1. This gives a(4) = prime(1)^3 = 8.
Then, n = 6 = 110[2] (in binary) has run lengths (2, 1): first two bits 1, then one bit 0. This is the same as for 4, just in reverse order, so it yields the same Heinz number a(6) = prime(2)*prime(1) = 6.
Then, n = 7 = 111[2] (in binary) has run lengths (3), namely: three bits 1. This gives a(5) = prime(3) = 5.
Sequence written as irregular triangle:
   1;
   2;
   4,  3;
   6,  8,  6,  5;
  10, 12, 16, 12,  9, 12, 10,  7;
  14, 20, 24, 18, 24, 32, 24, 20, 15, 18, 24, 18, 15, 20, 14, 11;
  ...
		

Crossrefs

Cf. A112798 and A296150 (partitions sorted by Heinz number).
Cf. A185974, A334433, A334435, A334438, A334434, A129129, A334436 (partitions given as Heinz numbers, in Abramowitz-Stegun, Maple, Mathematica order).
For "constructive" lists of partitions see A036036 (Abramowitz and Stegun order), A036036 (reversed), A080576 (Maple order), A080577 (Mathematica order).
Row sums of triangle give A030017(n+1).
Cf. A007088 (the binary numbers).
Cf. A101211 (the run lengths as rows of a table).

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, 1+n, (p->
          a(iquo(n, 2^p))*ithprime(p))(padic[ordp](n+(n mod 2), 2)))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Mar 20 2025
  • PARI
    Heinz(p)=vecprod([ prime(k) | k <- p ])
    RL(v) = if(#v, v=Vec(select(t->t,concat([1,v[^1]-v[^-1],1]),1)); v[^1]-v[^-1])
    apply( {A382255(n) = Heinz(RL(binary(n)))}, [0..99] )

Formula

a(2^n) = A001747(n+1).
a(2^n-1) = A008578(n+1).
a(2^n+1) = A001749(n-1) for n>=2.

A344084 Concatenated list of all finite nonempty sets of positive integers sorted first by maximum, then by length, and finally lexicographically.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, May 11 2021

Keywords

Examples

			The sets are the columns below:
  1 2 1 3 1 2 1 4 1 2 3 1 1 2 1 5 1 2 3 4 1 1 1 2 2 3 1
      2   3 3 2   4 4 4 2 3 3 2   5 5 5 5 2 3 4 3 4 4 2
              3         4 4 4 3           5 5 5 5 5 5 3
                              4                       5
As a tetrangle, the first four triangles are:
  {1}
  {2},{1,2}
  {3},{1,3},{2,3},{1,2,3}
  {4},{1,4},{2,4},{3,4},{1,2,4},{1,3,4},{2,3,4},{1,2,3,4}
		

Crossrefs

Triangle lengths are A000079.
Triangle sums are A001793.
Positions of first appearances are A005183.
Set maxima are A070939.
Set lengths are A124736.

Programs

  • Mathematica
    SortBy[Rest[Subsets[Range[5]]],Last]

A332567 T(n,k) is the k-th partition of n in graded reverse lexicographic ordering (A080577) encoded as concatenation of parts which are represented in (zeroless) bijective base-9 numeration (A052382) and separated by zeros; triangle T(n,k), n >= 0, 1 <= k <= A000041(n), read by rows.

Original entry on oeis.org

0, 1, 2, 101, 3, 201, 10101, 4, 301, 202, 20101, 1010101, 5, 401, 302, 30101, 20201, 2010101, 101010101, 6, 501, 402, 40101, 303, 30201, 3010101, 20202, 2020101, 201010101, 10101010101, 7, 601, 502, 50101, 403, 40201, 4010101, 30301, 30202, 3020101, 301010101
Offset: 0

Views

Author

Alois P. Heinz, Feb 16 2020

Keywords

Comments

The encoding used here allows a lossless and human-readable compression of all partitions. To decode a term replace the zeros with commas and read the parts in bijective base 9.
The empty partition is encoded as 0.

Examples

			T(6,6) = 30201 encodes the 6th partition of 6: [3,2,1].
T(10,1) = 11 encodes the 1st partition of 10: [10].
T(23,23) = 18040101 encodes the 23rd partition of 23: [17,4,1,1].
Triangle T(n,k) begins:
   0;
   1;
   2, 101;
   3, 201, 10101;
   4, 301, 202, 20101, 1010101;
   5, 401, 302, 30101, 20201, 2010101, 101010101;
   6, 501, 402, 40101, 303, 30201, 3010101, 20202, 2020101, ...
   7, 601, 502, 50101, 403, 40201, 4010101, 30301, 30202, ...
   8, 701, 602, 60101, 503, 50201, 5010101, 404, 40301, 40202, ...
   9, 801, 702, 70101, 603, 60201, 6010101, 504, 50301, 50202, ...
  11, 901, 802, 80101, 703, 70201, 7010101, 604, 60301, 60202, ...
  ...
		

Crossrefs

Column k=1 gives A052382 (for n>0).
Last row elements give A094028(n-1) (for n>0).

Programs

  • Maple
    g:= proc(n) option remember; local d, m, l; m, l:= n, "";
          while m>0 do d:= irem(m, 9, 'm');
            if d=0 then d:=9; m:= m-1 fi; l:= d, l
          od; parse(cat(l))
        end:
    b:= (n, i)-> `if`(n=0, [""], `if`(i<1, [], [map(x-> cat(
         0, g(i), x), b(n-i, min(n-i, i)))[], b(n, i-1)[]])):
    T:= n-> map(x-> parse(cat(0, x)), b(n$2))[]:
    seq(T(n), n=0..10);
Previous Showing 31-34 of 34 results.