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

A181187 Triangle read by rows: T(n,k) = sum of k-th largest elements in all partitions of n.

Original entry on oeis.org

1, 3, 1, 6, 2, 1, 12, 5, 2, 1, 20, 8, 4, 2, 1, 35, 16, 8, 4, 2, 1, 54, 24, 13, 7, 4, 2, 1, 86, 41, 22, 13, 7, 4, 2, 1, 128, 61, 35, 20, 12, 7, 4, 2, 1, 192, 95, 54, 33, 20, 12, 7, 4, 2, 1, 275, 136, 80, 49, 31, 19, 12, 7, 4, 2, 1, 399, 204, 121, 76, 48, 31, 19, 12, 7, 4, 2, 1, 556, 284
Offset: 1

Views

Author

Wouter Meeussen, Oct 09 2010

Keywords

Comments

For the connection with A066897 and A066898 see A206563. - Omar E. Pol, Feb 13 2012
T(n,k) is also the total number of parts >= k in all partitions of n. - Omar E. Pol, Feb 14 2012
The first differences of row n together with 1 give the row n of triangle A066633. - Omar E. Pol, Feb 26 2012
We define the k-th rank of a partition as the k-th part minus the number of parts >= k. Since the first part of a partition is also the largest part of the same partition so the Dyson's rank of a partition is the case for k = 1. It appears that the sum of the k-th ranks of all partitions of n is equal to zero. - Omar E. Pol, Mar 04 2012
T(n,k) is also the total number of divisors >= k of all positive integers in a sequence with n blocks where the m-th block consists of A000041(n-m) copies of m, with 1 <= m <= n. - Omar E. Pol, Feb 05 2021

Examples

			From _Omar E. Pol_, Feb 13 2012: (Start)
Illustration of initial terms. First five rows of triangle as sums of columns from the partitions of the first five positive integers:
.
.                            5
.                            3+2
.                  4         4+1
.                  2+2       2+2+1
.          3       3+1       3+1+1
.     2    2+1     2+1+1     2+1+1+1
.  1  1+1  1+1+1   1+1+1+1   1+1+1+1+1
. -------------------------------------
.  1, 3,1, 6,2,1, 12,5,2,1, 20,8,4,2,1 --> This triangle
.  |  |/|  |/|/|   |/|/|/|   |/|/|/|/|
.  1, 2,1, 4,1,1,  7,3,1,1, 12,4,2,1,1 --> A066633
.
For more information see A207031 and A206563.
...
Triangle begins:
    1;
    3,   1;
    6,   2,   1;
   12,   5,   2,  1;
   20,   8,   4,  2,  1;
   35,  16,   8,  4,  2,  1;
   54,  24,  13,  7,  4,  2,  1;
   86,  41,  22, 13,  7,  4,  2,  1;
  128,  61,  35, 20, 12,  7,  4,  2, 1;
  192,  95,  54, 33, 20, 12,  7,  4, 2, 1;
  275, 136,  80, 49, 31, 19, 12,  7, 4, 2, 1;
  399, 204, 121, 76, 48, 31, 19, 12, 7, 4, 2, 1;
(End)
		

Crossrefs

Row sums are A066186. First column is A006128. Reverse of each row converges to A000070.
Columns 2-3: A096541, A207033. - Omar E. Pol, Feb 18 2012
T(2n,n) gives A216053(n+1).
Cf. A206283.

Programs

  • Maple
    p:= (f, g)-> zip((x, y)-> x+y, f, g, 0):
    b:= proc(n, i) option remember; local f, g;
          if n=0 or i=1 then [1, n]
        else f:= b(n, i-1); g:= `if`(i>n, [0], b(n-i, i));
             p(p(f, g), [0$i, g[1]])
          fi
        end:
    T:= proc(n) local j, l, r, t;
          l, r, t:= b(n, n), 1, 1;
          for j from n to 2 by -1 do t:= t+l[j]; r:=r, t od;
          seq([r][1+n-j], j=1..n)
        end:
    seq(T(n), n=1..14); # Alois P. Heinz, Apr 05 2012
  • Mathematica
    Table[Plus @@ (PadRight[ #,n]& /@ IntegerPartitions[n]),{n,16}]
    (* Second program: *)
    T[n_, n_] = 1; T[n_, k_] /; k, ] = 0; Table[Table[T[n, k], {k, n, 1, -1}] // Accumulate // Reverse, {n, 1, 16}] // Flatten (* Jean-François Alcover, Oct 10 2015, after Omar E. Pol *)

Formula

T(n,k) = Sum_{j=1..n} A207031(j,k). - Omar E. Pol, May 02 2012

Extensions

Better definition from Omar E. Pol, Feb 13 2012

A330661 T(n,k) is the index within the partitions of n in canonical ordering of the k-th partition whose parts differ pairwise by at most one.

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 1, 3, 4, 5, 1, 3, 5, 6, 7, 1, 5, 8, 9, 10, 11, 1, 5, 9, 12, 13, 14, 15, 1, 8, 13, 18, 19, 20, 21, 22, 1, 8, 19, 22, 26, 27, 28, 29, 30, 1, 13, 22, 30, 37, 38, 39, 40, 41, 42, 1, 13, 30, 41, 46, 51, 52, 53, 54, 55, 56, 1, 20, 44, 59, 62, 71, 72, 73, 74, 75, 76, 77
Offset: 1

Views

Author

Peter Dolland, Dec 23 2019

Keywords

Comments

For each length k in [1..n] there is exactly one such partition [p_1,...,p_k], with p_i = a+1 for i=1..j and p_i = a for i=j+1..k, where a = floor(n/k) and j = n - k * a.
If k | n, then all parts p_i are equal. A027750 lists the indices of these partitions in this triangle.
Canonical ordering is also known as graded reverse lexicographic ordering, see A080577 or link below.

Examples

			Partitions of 8 in canonical ordering begin: 8, 71, 62, 611, 53, 521, 5111, 44, 431, 422, 4211, 41111, 332, ... . The partitions whose parts differ pairwise by at most one in this list are 8, 44, 332, ... at indices 1, 8, 13, ... and this gives row 8 of this triangle.
Triangle T(n,k) begins:
  1;
  1,  2;
  1,  2,  3;
  1,  3,  4,  5;
  1,  3,  5,  6,  7;
  1,  5,  8,  9, 10, 11;
  1,  5,  9, 12, 13, 14, 15;
  1,  8, 13, 18, 19, 20, 21, 22;
  1,  8, 19, 22, 26, 27, 28, 29, 30;
  1, 13, 22, 30, 37, 38, 39, 40, 41, 42;
  ...
		

Crossrefs

Programs

  • Maple
    b:= proc(l) option remember; (n-> `if`(n=0, 1,
          b(subsop(1=[][], l))+g(n, l[1]-1)))(add(j, j=l))
        end:
    g:= proc(n, i) option remember; `if`(n=0 or i=1, 1,
         `if`(i<1, 0, g(n-i, min(n-i, i))+g(n, i-1)))
        end:
    T:= proc(n, k) option remember; 1 + g(n$2)-
          b((q-> [q+1$r, q$k-r])(iquo(n, k, 'r')))
        end:
    seq(seq(T(n, k), k=1..n), n=1..14);  # Alois P. Heinz, Feb 19 2020
  • Mathematica
    b[l_List] := b[l] = Function[n, If[n == 0, 1, b[ReplacePart[l, 1 -> Nothing]] + g[n, l[[1]] - 1]]][Total[l]];
    g[n_, i_] := g[n, i] = If[n == 0 || i == 1, 1, If[i < 1, 0, g[n - i, Min[n - i, i]] + g[n, i - 1]]];
    T[n_, k_] := T[n, k] = Module[{q, r}, {q, r} = QuotientRemainder[n, k]; 1 + g[n, n] - b[Join[Table[q + 1, {r}], Table[q, {k - r}]]]];
    Table[T[n, k], {n, 1, 14}, {k, 1, n}] // Flatten (* Jean-François Alcover, Apr 29 2020, after Alois P. Heinz *)
  • PARI
    balP(p) = p[1]-p[#p]<=1
    Row(n)={v=vecsort([Vecrev(p) | p<-partitions(n)], , 4);select(i->balP(v[i]),[1..#v])}
    { for(n=1, 10, print(Row(n))) }

Formula

T(n,1) = 1.
T(n,n) = A000041(n).
T(n,k) = A000041(n) - (n - k) for k = ceiling(n/2)..n.
T(2n,2) = T(2n+1,2) = A216053(n). - Alois P. Heinz, Jan 28 2020

A332706 Index position of {2}^n within the list of partitions of 2n in canonical ordering.

Original entry on oeis.org

1, 1, 3, 8, 18, 37, 71, 128, 223, 376, 617, 991, 1563, 2423, 3704, 5589, 8333, 12293, 17959, 25996, 37318, 53153, 75153, 105535, 147249, 204201, 281563, 386128, 526795, 715191, 966437, 1300125, 1741598, 2323487, 3087701, 4087933, 5392747, 7089463, 9289053
Offset: 0

Views

Author

Alois P. Heinz, Feb 20 2020

Keywords

Comments

The canonical ordering of partitions is described in A080577.

Examples

			a(3) = 8, because 222 has position 8 within the list of partitions of 6 in canonical ordering: 6, 51, 42, 411, 33, 321, 3111, 222, ... .
		

Crossrefs

Bisection (even part) of A058984.

Programs

  • Maple
    a:= n-> combinat[numbpart](2*n)-n:
    seq(a(n), n=0..44);
  • Mathematica
    a[n_] := PartitionsP[2n] - n;
    Table[a[n], {n, 0, 44}] (* Jean-François Alcover, Aug 20 2021, from Maple *)

Formula

a(n) = A000041(2n) - n.
a(n) = A058984(2n).
a(n) = A330661(2n,n).

A308365 Numbers which are products of repunits.

Original entry on oeis.org

1, 11, 111, 121, 1111, 1221, 1331, 11111, 12221, 12321, 13431, 14641, 111111, 122221, 123321, 134431, 135531, 147741, 161051, 1111111, 1222221, 1233321, 1234321, 1344431, 1356531, 1367631, 1478741, 1490841, 1625151, 1771561, 11111111, 12222221, 12333321
Offset: 1

Views

Author

Sergio Pimentel, May 22 2019

Keywords

Comments

The number of terms below 10^n is A216053(n)-1 for 1 <= n <= 25, but not for larger n. - Rémy Sigrist, May 28 2019
The product of repunits is not necessarily palindromic, see A339676. - Bernard Schott, Apr 02 2021

Examples

			a(11) = 13431 is in the sequence since it is the product of repunits (11^2*111).
		

Crossrefs

Cf. A002275 (repunits), A083278 (repunit powers), A216053, A339676 (nonpalindromic terms).

Programs

  • Maple
    d:= 10: # for terms < 10^d
    N:= 10^d:
    S:= {1}:
    for m from 2 to d do
      r:= (10^m-1)/9;
      k:= floor(log[r](N));
      V:= S;
      for i from 1 to k do
        V:= select(`<`,map(`*`,V,r),N);
        S:= S union V
      od;
    od:
    sort(convert(S,list)); # Robert Israel, Nov 26 2020

Extensions

Missing a(25) = 1356531 inserted by Ilya Gutkovskiy, Apr 14 2020
Showing 1-4 of 4 results.