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-10 of 380 results. Next

A237591 Irregular triangle read by rows: T(n,k) is the difference between the total number of partitions of all positive integers <= n into exactly k consecutive parts, and the total number of partitions of all positive integers <= n into exactly k+1 consecutive parts (n>=1, 1<=k<=A003056(n)).

Original entry on oeis.org

1, 2, 2, 1, 3, 1, 3, 2, 4, 1, 1, 4, 2, 1, 5, 2, 1, 5, 2, 2, 6, 2, 1, 1, 6, 3, 1, 1, 7, 2, 2, 1, 7, 3, 2, 1, 8, 3, 1, 2, 8, 3, 2, 1, 1, 9, 3, 2, 1, 1, 9, 4, 2, 1, 1, 10, 3, 2, 2, 1, 10, 4, 2, 2, 1, 11, 4, 2, 1, 2, 11, 4, 3, 1, 1, 1, 12, 4, 2, 2, 1, 1, 12, 5, 2, 2, 1, 1, 13, 4, 3, 2, 1, 1, 13, 5, 3, 1, 2, 1, 14, 5, 2, 2, 2, 1
Offset: 1

Views

Author

Omar E. Pol, Feb 22 2014

Keywords

Comments

The original name was: Triangle read by rows: T(n,k) = A235791(n,k) - A235791(n,k+1), assuming that the virtual right border of triangle A235791 is A000004.
T(n,k) is also the length of the k-th segment in a zig-zag path on the first quadrant of the square grid, connecting the point (n, 0) with the point (m, m), starting with a segment in vertical direction, where m <= n.
Conjecture: the area of the polygon defined by the x-axis, this zig-zag path and the diagonal [(0, 0), (m, m)], is equal to A024916(n)/2, one half of the sum of all divisors of all positive integers <= n. Therefore the reflected polygon, which is adjacent to the y-axis, with the zig-zag path connecting the point (0, n) with the point (m, m), has the same property. And so on for each octant in the four quadrants.
For the representation of A024916 and A000203 we use two octants, for example: the first octant and the second octant, or the 6th octant and the 7th octant, etc., see A237593.
At least up to n = 128, two zig-zag paths never cross (checked by hand).
The finite sequence formed by the n-th row of triangle together with its mirror row gives the n-th row of triangle A237593.
The connection between A196020 and A237271 is as follows: A196020 --> A236104 --> A235791 --> this sequence --> A237593 --> A239660 --> A237270 --> A237271.
Comments from Franklin T. Adams-Watters on sequences related to the "symmetric representation of sigma" in A235791 and related sequences, Mar 31 2014. (Start)
The place to start is with A235791, which is very simple. Then go to A237591, also very simple, and A237593, still very simple.
You then need to interpret the rows of A237593 as Dyck paths. This interpretation is in terms of run lengths, so 2,1,1,2 means up twice, down once, up once, and down twice. Because the rows of A237593 are symmetric and of even length, this path will always be symmetric.
Now the surprising fact is that the areas enclosed by the Dyck path for n (laid on its side) always includes the area enclosed for n-1; and the number of squares added is sigma(n).
Finally, look at the connected areas enclosed by n but not by n-1; the size of these areas is the symmetric representation of sigma. (End)
From Hartmut F. W. Hoft, Apr 07 2014: (Start)
The row sum is A235791(n,1) - A235791(n,floor((sqrt(8n+1)-1)/2)+1) = n - 0.
Mathematica function has been written to check the conjecture as well as non-crossing zig-zag paths (Dyck paths rotated by 90 degrees) up through n=30000 (same applies to A237593). (End)
The n-th zig-zag path ending at the point (m, m), where m = A240542(n). - Omar E. Pol, Apr 16 2014
From Omar E. Pol, Aug 23 2015: (Start)
n is an odd prime if and only if T(n,2) = 1 + T(n-1,2) and T(n,k) = T(n-1,k) for the rest of the values of k.
The elements of the n-th row of triangle together with the elements of the n-th row of triangle A261350 give the n-th row of triangle A237593.
T(n,k) is also the area (or the number of cells) of the k-th vertical side at the n-th level (starting from the top) in the left hand part of the front view of the stepped pyramid described in A245092, see Example section.
(End)
From Omar E. Pol, Nov 19 2015: (Start)
T(n,k) is also the number of cells between the k-th and the (k+1)st line segments (from left to right) in the n-th row of the diagram as shown in Example section.
Note that the number of horizontal line segments in the n-th row of the diagram equals A001227(n), the number of odd divisors of n. (End)
Conjecture: the values f(n,k) in the n-th row of the triangle are either 1 or 2 for all k with ceiling((sqrt(4*n+1)-1)/2) <= k <= floor((sqrt(8*n+1)-1)/2) = r(n), the length of the n-th row, though the lower bound need not be minimal; tested through 2500000. See also A285356. - Hartmut F. W. Hoft, Apr 17 2017
Conjecture: T(n,k) is the difference between the total number of partitions of all positive integers <= n into exactly k consecutive parts, and the total number of partitions of all positive integers <= n into exactly k+1 consecutive parts. - Omar E. Pol, Apr 30 2017
From Omar E. Pol, Aug 31 2021: (Start)
It appears that T(n,2)/T(n,1) converges to 1/3.
It appears that T(n,3)/T(n,2) converges to 1/2.
It appears that T(n,4)/T(n,3) converges to 3/5.
It appears that T(n,5)/T(n,4) converges to 2/3. (End)
In other words: T(n,k) is the length of the k-th line segment of the largest Dyck path of the symmetric representation of sigma(n). - Omar E. Pol, Sep 08 2021

Examples

			Triangle begins:
   1;
   2;
   2, 1;
   3, 1;
   3, 2;
   4, 1, 1;
   4, 2, 1;
   5, 2, 1;
   5, 2, 2;
   6, 2, 1, 1;
   6, 3, 1, 1;
   7, 2, 2, 1;
   7, 3, 2, 1;
   8, 3, 1, 2;
   8, 3, 2, 1, 1;
   9, 3, 2, 1, 1;
   9, 4, 2, 1, 1;
  10, 3, 2, 2, 1;
  10, 4, 2, 2, 1;
  11, 4, 2, 1, 2;
  11, 4, 3, 1, 1, 1;
  12, 4, 2, 2, 1, 1;
  12, 5, 2, 2, 1, 1;
  13, 4, 3, 2, 1, 1;
  13, 5, 3, 1, 2, 1;
  14, 5, 2, 2, 2, 1;
  14, 5, 3, 2, 1, 2;
  15, 5, 3, 2, 1, 1, 1;
  ...
For n = 10 the 10th row of triangle A235791 is [10, 4, 2, 1] so row 10 is [6, 2, 1, 1].
From _Omar E. Pol_, Aug 23 2015: (Start)
Illustration of initial terms:
  Row                                                         _
   1                                                        _|1|
   2                                                      _|2 _|
   3                                                    _|2  |1|
   4                                                  _|3   _|1|
   5                                                _|3    |2 _|
   6                                              _|4     _|1|1|
   7                                            _|4      |2  |1|
   8                                          _|5       _|2 _|1|
   9                                        _|5        |2  |2 _|
  10                                      _|6         _|2  |1|1|
  11                                    _|6          |3   _|1|1|
  12                                  _|7           _|2  |2  |1|
  13                                _|7            |3    |2 _|1|
  14                              _|8             _|3   _|1|2 _|
  15                            _|8              |3    |2  |1|1|
  16                          _|9               _|3    |2  |1|1|
  17                        _|9                |4     _|2 _|1|1|
  18                      _|10                _|3    |2  |2  |1|
  19                    _|10                 |4      |2  |2 _|1|
  20                  _|11                  _|4     _|2  |1|2 _|
  21                _|11                   |4      |3   _|1|1|1|
  22              _|12                    _|4      |2  |2  |1|1|
  23            _|12                     |5       _|2  |2  |1|1|
  24          _|13                      _|4      |3    |2 _|1|1|
  25        _|13                       |5        |3   _|1|2  |1|
  26      _|14                        _|5       _|2  |2  |2 _|1|
  27    _|14                         |5        |3    |2  |1|2 _|
  28   |15                           |5        |3    |2  |1|1|1|
  ...
Also the diagram represents the left part of the front view of the pyramid described in A245092. For the other half front view see A261350. For more information about the pyramid and the symmetric representation of sigma see A237593. (End)
From _Omar E. Pol_, Sep 08 2021: (Start)
For n = 12 the symmetric representation of sigma(12) in the fourth quadrant is as shown below:
.                           _
                           | |
                           | |
                           | |
                           | |
                           | |
                      _ _ _| |
                    _|    _ _|
                  _|     |
                 |      _|
                 |  _ _|1
      _ _ _ _ _ _| |  2
     |_ _ _ _ _ _ _|2
            7
.
The lengths of the successive line segments from the first vertex to the central vertex of the largest Dyck path are [7, 2, 2, 1] respectively, the same as the 12th row of triangle. (End)
		

Crossrefs

Row n has length A003056(n) hence column k starts in row A000217(k).
Row sums give A000027.
Column 1 is A008619, n >= 1.
Right border gives A042974.

Programs

  • Mathematica
    row[n_]:= Floor[(Sqrt[8*n+1] -1)/2];  f[n_,k_]:= Ceiling[(n+1)/k-(k+1)/2] - Ceiling[(n+1)/(k+1)-(k+2)/2];
    Table[f[n,k],{n,1,50},{k,1,row[n]}]//Flatten
    (* Hartmut F. W. Hoft, Apr 08 2014 *)
  • PARI
    row235791(n) = vector((sqrtint(8*n+1)-1)\2, i, 1+(n-(i*(i+1)/2))\i);
    row(n) = {my(orow = concat(row235791(n), 0)); vector(#orow -1, i, orow[i] - orow[i+1]);} \\ Michel Marcus, Mar 27 2014
    
  • Python
    from sympy import sqrt
    import math
    def T(n, k): return int(math.ceil((n + 1)/k - (k + 1)/2)) - int(math.ceil((n + 1)/(k + 1) - (k + 2)/2))
    for n in range(1, 29): print([T(n, k) for k in range(1, int((sqrt(8*n + 1) - 1)/2) + 1)]) # Indranil Ghosh, Apr 30 2017

Formula

T(n,k) = ceiling((n+1)/k - (k+1)/2) - ceiling((n+1)/(k+1) - (k+2)/2), for 1 <= n and 1 <= k <= floor((sqrt(8n+1)-1)/2). - Hartmut F. W. Hoft, Apr 07 2014

Extensions

3 more rows added by Omar E. Pol, Aug 23 2015
New name from a comment dated Apr 30 2017. - Omar E. Pol, Jun 18 2023

A238350 Triangle T(n,k) read by rows: T(n,k) is the number of compositions of n with k parts p at position p (fixed points), n>=0, 0<=k<=A003056(n).

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 1, 1, 3, 4, 1, 6, 7, 3, 11, 16, 4, 1, 22, 29, 12, 1, 42, 60, 23, 3, 82, 120, 47, 7, 161, 238, 100, 12, 1, 316, 479, 198, 30, 1, 624, 956, 404, 61, 3, 1235, 1910, 818, 126, 7, 2449, 3817, 1652, 258, 16, 4864, 7633, 3319, 537, 30, 1, 9676, 15252, 6686, 1083, 70, 1, 19267, 30491, 13426, 2205
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 25 2014

Keywords

Examples

			Triangle T(n,k) begins:
00 :   1;
01 :   0,   1;
02 :   1,   1;
03 :   2,   1,   1;
04 :   3,   4,   1;
05 :   6,   7,   3;
06 :  11,  16,   4,  1;
07 :  22,  29,  12,  1;
08 :  42,  60,  23,  3;
09 :  82, 120,  47,  7;
10 : 161, 238, 100, 12, 1;
11 : 316, 479, 198, 30, 1;
12 : 624, 956, 404, 61, 3;
     ...
		

References

  • M. Archibald, A. Blecher and A. Knopfmacher, Fixed points in compositions and words, accepted by the Journal of Integer Sequences.

Crossrefs

Row sums are A011782.
T(n*(n+3)/2,n) = A227682(n).
Same as A238349 without the trailing zeros.
Cf. A099036.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, expand(
           add(b(n-j, i+1)*`if`(i=j, x, 1), j=1..n)))
        end:
    T:= n->(p->seq(coeff(p, x, i), i=0..degree(p)))(b(n, 1)):
    seq(T(n), n=0..20);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, Expand[Sum[b[n-j, i+1]*If[i == j, x, 1], {j, 1, n}]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, 1]]; Table[T[n], {n, 0, 20}] // Flatten (* Jean-François Alcover, Feb 11 2015, after Alois P. Heinz *)

Formula

Sum_{k=0..A003056(n)} k * T(n,k) = A099036(n-1) for n>0.

A131632 Triangle T(n,k) read by rows = number of partitions of n-set into k blocks with distinct sizes, k = 1..A003056(n).

Original entry on oeis.org

1, 1, 1, 3, 1, 4, 1, 15, 1, 21, 60, 1, 63, 105, 1, 92, 448, 1, 255, 2016, 1, 385, 4980, 12600, 1, 1023, 15675, 27720, 1, 1585, 61644, 138600, 1, 4095, 155155, 643500, 1, 6475, 482573, 4408404, 1, 16383, 1733550, 12687675, 37837800, 1, 26332, 4549808, 60780720
Offset: 1

Views

Author

Vladeta Jovovic, Sep 04 2007

Keywords

Comments

Row sums = A007837.
Sum k! * T(n,k) = A032011.
Sum k * T(n,k) = A131623. - Geoffrey Critzer, Aug 30 2012.
T(n,k) is also the number of words w of length n over a k-ary alphabet {a1,a2,...,ak} with #(w,a1) > #(w,a2) > ... > #(w,ak) > 0, where #(w,x) counts the letters x in word w. T(5,2) = 15: aaaab, aaaba, aaabb, aabaa, aabab, aabba, abaaa, abaab, ababa, abbaa, baaaa, baaab, baaba, babaa, bbaaa. - Alois P. Heinz, Jun 21 2013

Examples

			Triangle T(n,k)begins:
  1;
  1;
  1,     3;
  1,     4;
  1,    15;
  1,    21,      60;
  1,    63,     105;
  1,    92,     448;
  1,   255,    2016;
  1,   385,    4980,    12600;
  1,  1023,   15675,    27720;
  1,  1585,   61644,   138600;
  1,  4095,  155155,   643500;
  1,  6475,  482573,  4408404;
  1, 16383, 1733550, 12687675, 37837800;
  ...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t, v) option remember; `if`(t=1, 1/(n+v)!,
          add(b(n-j, j, t-1, v+1)/(j+v)!, j=i..n/t))
        end:
    T:= (n, k)->`if`(k*(k+1)/2>n, 0, n!*b(n-k*(k+1)/2, 0, k, 1)):
    seq(seq(T(n, k), k=1..floor(sqrt(2+2*n)-1/2)), n=1..20);
    # Alois P. Heinz, Jun 21 2013
    # second Maple program:
    b:= proc(n, i) option remember; `if`(i*(i+1)/2 (p-> seq(coeff(p, x, i), i=1..degree(p)))(b(n$2)):
    seq(T(n), n=1..20);  # Alois P. Heinz, Sep 27 2019
  • Mathematica
    nn=10;p=Product[1+y x^i/i!,{i,1,nn}];Range[0,nn]! CoefficientList[ Series[p,{x,0,nn}],{x,y}]//Grid  (* Geoffrey Critzer, Aug 30 2012 *)

Formula

E.g.f.: Product_{n>=1} (1+y*x^n/n!).
T(A000217(n),n) = A022915(n). - Alois P. Heinz, Jul 03 2018

A242027 Number T(n,k) of endofunctions on [n] with cycles of k distinct lengths; triangle T(n,k), n>=0, 0<=k<=A003056(n), read by rows.

Original entry on oeis.org

1, 0, 1, 0, 4, 0, 24, 3, 0, 206, 50, 0, 2300, 825, 0, 31742, 14794, 120, 0, 522466, 294987, 6090, 0, 9996478, 6547946, 232792, 0, 218088504, 160994565, 8337420, 0, 5344652492, 4355845868, 299350440, 151200, 0, 145386399554, 128831993037, 11074483860, 18794160
Offset: 0

Views

Author

Alois P. Heinz, Aug 11 2014

Keywords

Examples

			T(3,2) = 3: (1,3,2), (3,2,1), (2,1,3).
Triangle T(n,k) begins:
00 :  1;
01 :  0,          1;
02 :  0,          4;
03 :  0,         24,          3;
04 :  0,        206,         50;
05 :  0,       2300,        825;
06 :  0,      31742,      14794,       120;
07 :  0,     522466,     294987,      6090;
08 :  0,    9996478,    6547946,    232792;
09 :  0,  218088504,  160994565,   8337420;
10 :  0, 5344652492, 4355845868, 299350440, 151200;
		

Crossrefs

Row sums give A000312.
T(A000217(n),n) gives A246292.
Cf. A003056, A060281, A218868 (the same for permutations).

Programs

  • Maple
    with(combinat):
    b:= proc(n, i, k) option remember; `if`(n=0, `if`(k=0, 1, 0),
          `if`(i<1 or k<1, 0, add((i-1)!^j*multinomial(n, n-i*j, i$j)/j!*
          b(n-i*j, i-1, k-`if`(j=0, 0, 1)), j=0..n/i)))
        end:
    T:= (n, k)-> add(binomial(n-1, j-1)*n^(n-j)*b(j$2, k), j=0..n):
    seq(seq(T(n, k), k=0..floor((sqrt(1+8*n)-1)/2)), n=0..14);
  • Mathematica
    multinomial[n_, k_] := n!/Times @@ (k!); b[n_, i_, k_] := b[n, i, k] = If[n == 0, If[k==0, 1, 0], If[i<1 || k<1, 0, Sum[(i-1)!^j*multinomial[n, Join[ {n-i*j}, Array[i&, j]]]/j!*b[n-i*j, i-1, k-If[j==0, 0, 1]], {j, 0, n/i}]] ]; T[0, 0] = 1; T[n_, k_] := Sum[Binomial[n-1, j-1]*n^(n-j)*b[j, j, k], {j, 0, n}]; Table[T[n, k], {n, 0, 14}, {k, 0, Floor[(Sqrt[1+8n]-1)/2]}] // Flatten (* Jean-François Alcover, Feb 18 2017, translated from Maple *)

A258323 Sum T(n,k) over all partitions lambda of n into k distinct parts of Product_{i:lambda} prime(i); triangle T(n,k), n>=0, 0<=k<=A003056(n), read by rows.

Original entry on oeis.org

1, 0, 2, 0, 3, 0, 5, 6, 0, 7, 10, 0, 11, 29, 0, 13, 43, 30, 0, 17, 94, 42, 0, 19, 128, 136, 0, 23, 231, 293, 0, 29, 279, 551, 210, 0, 31, 484, 892, 330, 0, 37, 584, 1765, 852, 0, 41, 903, 2570, 1826, 0, 43, 1051, 4273, 4207, 0, 47, 1552, 6747, 6595, 2310
Offset: 0

Views

Author

Alois P. Heinz, May 26 2015

Keywords

Examples

			T(6,2) = 43 because the partitions of 6 into 2 distinct parts are {[5,1], [4,2]} and prime(5)*prime(1) + prime(4)*prime(2) = 11*2 + 7*3 = 22 + 21 = 43.
Triangle T(n,k) begins:
  1
  0,  2;
  0,  3;
  0,  5,   6;
  0,  7,  10;
  0, 11,  29;
  0, 13,  43,  30;
  0, 17,  94,  42;
  0, 19, 128, 136;
  0, 23, 231, 293;
  0, 29, 279, 551, 210;
		

Crossrefs

Row sums give A147655.
T(n*(n+1)/2,n) = A002110(n).
T(n^2,n) = A321267(n).

Programs

  • Maple
    g:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0, expand(
          add(g(n-i*j, i-1)*(ithprime(i)*x)^j, j=0..min(1, n/i)))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(g(n$2)):
    seq(T(n), n=0..20);
  • Mathematica
    g[n_, i_] := g[n, i] = If[n==0, 1, If[i<1, 0, Expand[Sum[g[n-i*j, i-1] * (Prime[i]*x)^j, {j, 0, Min[1, n/i]}]]]]; T[n_] := Function[p, Table[ Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][g[n, n]]; Table[T[n], {n, 0, 20}] // Flatten (* Jean-François Alcover, Jan 06 2017, after Alois P. Heinz *)

A321878 Number T(n,k) of partitions of n into colored blocks of equal parts, such that all colors from a set of size k are used and the colors are introduced in increasing order; triangle T(n,k), n>=0, 0<=k<=A003056(n), read by rows.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 3, 1, 0, 5, 2, 0, 7, 5, 0, 11, 9, 1, 0, 15, 17, 2, 0, 22, 28, 5, 0, 30, 47, 10, 0, 42, 74, 21, 1, 0, 56, 116, 37, 2, 0, 77, 175, 67, 5, 0, 101, 263, 112, 10, 0, 135, 385, 187, 20, 0, 176, 560, 302, 40, 1, 0, 231, 800, 479, 72, 2, 0, 297, 1135, 741, 127, 5
Offset: 0

Views

Author

Alois P. Heinz, Aug 27 2019

Keywords

Comments

T(n,k) is defined for all n>=0 and k>=0. The triangle contains only elements with 0 <= k <= A003056(n). T(n,k) = 0 for k > A003056(n).
For fixed k>=1, T(n,k) ~ exp(sqrt(2*(Pi^2 - 6*polylog(2, 1-k))*n/3)) * sqrt(Pi^2 - 6*polylog(2, 1-k)) / (4*k!*sqrt(3*k)*Pi*n). - Vaclav Kotesovec, Sep 18 2019

Examples

			T(6,1) = 11: 111111a, 2a1111a, 22a11a, 222a, 3a111a, 3a2a1a, 33a, 4a11a, 4a2a, 5a1a, 6a.
T(6,2) = 9: 2a1111b, 22a11b, 3a111b, 3a2a1b, 3a2b1a, 3a2b1b, 4a11b, 4a2b, 5a1b.
T(6,3) = 1: 3a2b1c.
Triangle T(n,k) begins:
  1;
  0,  1;
  0,  2;
  0,  3,   1;
  0,  5,   2;
  0,  7,   5;
  0, 11,   9,  1;
  0, 15,  17,  2;
  0, 22,  28,  5;
  0, 30,  47, 10;
  0, 42,  74, 21, 1;
  0, 56, 116, 37, 2;
  0, 77, 175, 67, 5;
  ...
		

Crossrefs

Columns k=0-10 give: A000007, A000041 (for n>0), A327285, A327286, A327287, A327288, A327289, A327290, A327291, A327292, A327293.
Row sums give A305106.

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0, add(
         (t-> b(t, min(t, i-1), k))(n-i*j), j=1..n/i)*k+b(n, i-1, k)))
        end:
    T:= (n, k)-> add(b(n$2, k-i)*(-1)^i*binomial(k, i), i=0..k)/k!:
    seq(seq(T(n, k), k=0..floor((sqrt(1+8*n)-1)/2)), n=0..20);
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, Sum[With[{t = n - i j}, b[t, Min[t, i - 1], k]], {j, 1, n/i}] k + b[n, i - 1, k]]];
    T[n_, k_] := Sum[b[n, n, k - i] (-1)^i Binomial[k, i], {i, 0, k}]/k!;
    Table[Table[T[n, k], {k, 0, Floor[(Sqrt[1 + 8n] - 1)/2]}], {n, 0, 20}] // Flatten (* Jean-François Alcover, Dec 14 2020, after Alois P. Heinz *)

Formula

T(n,k) = 1/k! * Sum_{i=0..k} (-1)^i*binomial(k,i) A321884(n,k-i).
T(n*(n+1)/2,n) = T(A000217(n),n) = 1.
T(n*(n+3)/2,n) = T(A000096(n),n) = A000712(n).
Sum_{k=1..A003056(n)} k * T(n,k) = A322304(n).

A137688 2^A003056: 2^n appears n+1 times.

Original entry on oeis.org

1, 2, 2, 4, 4, 4, 8, 8, 8, 8, 16, 16, 16, 16, 16, 32, 32, 32, 32, 32, 32, 64, 64, 64, 64, 64, 64, 64, 128, 128, 128, 128, 128, 128, 128, 128, 256, 256, 256, 256, 256, 256, 256, 256, 256, 512, 512, 512, 512, 512, 512, 512, 512, 512, 512, 1024, 1024, 1024, 1024, 1024, 1024
Offset: 0

Views

Author

M. F. Hasler, Feb 06 2008

Keywords

Comments

First differences of A007664.
Viewed as a triangle, it is computed like Pascal's triangle, but with 2^n on the triangle edges. - T. D. Noe, Jul 31 2013
From Paul Curtz, Oct 23 2018: (Start)
Oresme numbers O(n) = n/2^n are an autosequence of the first kind. The corresponding sequence of the second kind is 1/2^n. The difference table is
1 1/2 1/4 1/8 ...
-1/2 -1/4 -1/8 -1/16 ...
1/4 1/8 1/16 1/32 ...
-1/8 -1/16 -1/32 -1/64 ...
etc.
The denominators on the antidiagonals are a(n). (End)

Examples

			Triangle T(n,k) begins:
1
2, 2
4, 4, 4
8, 8, 8, 8
16, 16, 16, 16, 16
32, 32, 32, 32, 32, 32
64, 64, 64, 64, 64, 64, 64
- _Philippe Deléham_, Dec 26 2013
		

Crossrefs

Cf. A003056, A007664 (gives partial sums).

Programs

  • GAP
    Flat(List([0..10],n->List([1..n+1],k->2^n))); # Muniru A Asiru, Oct 23 2018
    
  • Haskell
    a137688 n = a137688_list !! n
    a137688_list = concat $ zipWith ($) (map replicate [1..]) (map (2^) [0..])
    -- Reinhard Zumkeller, Mar 18 2011
    
  • Maple
    seq(seq(2^n,k=1..n+1),n=0..10); # Muniru A Asiru, Oct 23 2018
  • Mathematica
    t = {}; Do[r = {}; Do[If[k == 0||k == n, m = 2^n, m = t[[n, k]] + t[[n, k + 1]]]; r = AppendTo[r, m], {k, 0, n}]; AppendTo[t, r], {n, 0, 9}]; t = Flatten[t] (* Vincenzo Librandi, Aug 01 2013 *)
  • PARI
    A137688(n)= 1<
    				
  • Python
    from math import isqrt
    def A137688(n): return 1<<(isqrt((n<<3)+1)-1>>1) # Chai Wah Wu, Feb 10 2023

Formula

a(n) = 2^[sqrt(2n+2)-.5] = 2^A003056(n) = A007664(n+1) - A007664(n).
Closed-form formula for arbitrary left and right borders of Pascal like triangle see A228196. - Boris Putievskiy, Aug 19 2013
Viewed as a triangle T(n,k) : T(n,k)=2*T(n-1,k)+2*T(n-1,k-1)-4*T(n-2,k-1), T(0,0)=1, T(n,k)=0 if k<0 or if k>n. - Philippe Deléham, Dec 26 2013
Sum_{n>=0} 1/a(n) = 4. - Amiram Eldar, Aug 16 2022

A219311 Number T(n,k) of standard Young tableaux for partitions of n into exactly k distinct parts; triangle T(n,k), n>=0, 0<=k<=A003056(n), read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 2, 0, 1, 3, 0, 1, 9, 0, 1, 14, 16, 0, 1, 34, 35, 0, 1, 55, 134, 0, 1, 125, 435, 0, 1, 209, 1213, 768, 0, 1, 461, 3454, 2310, 0, 1, 791, 10484, 11407, 0, 1, 1715, 28249, 44187, 0, 1, 3002, 80302, 200044, 0, 1, 6434, 231895, 680160, 292864
Offset: 0

Views

Author

Alois P. Heinz, Nov 17 2012

Keywords

Comments

T(n,k) is defined for n,k >= 0. The triangle contains only the terms with k<=A003056(n). T(n,k) = 0 for k>A003056(n).

Examples

			A(4,2) = 3:
  +---------+  +---------+  +---------+
  | 1  2  3 |  | 1  2  4 |  | 1  3  4 |
  | 4 .-----+  | 3 .-----+  | 2 .-----+
  +---+        +---+        +---+
Triangle T(n,k) begins:
  1;
  0,  1;
  0,  1;
  0,  1,    2;
  0,  1,    3;
  0,  1,    9;
  0,  1,   14,    16;
  0,  1,   34,    35;
  0,  1,   55,   134;
  0,  1,  125,   435;
  0,  1,  209,  1213,   768;
  0,  1,  461,  3454,  2310;
  0,  1,  791, 10484, 11407;
  ...
		

Crossrefs

Columns k=0-10 give: A000007, A000012 (for n>0), A047171(n) = A037952(n)-1, A219316, A219317, A219318, A219319, A219320, A219321, A219322, A219323.
Row sums give: A218293.
Row lengths are 1 + A003056(n).
T(A000217(k),k) = A005118(k+1).

Programs

  • Maple
    h:= proc(l) local n; n:=nops(l); add(i, i=l)!/mul(mul(1+l[i]-j+
          add(`if`(l[k]>=j, 1, 0), k=i+1..n), j=1..l[i]), i=1..n)
        end:
    g:= proc(n, i, k, l) `if`(n=0, h(l), `if`(n>k*(i-(k-1)/2), 0,
          g(n, i-1, min(k, i-1), l)+`if`(i>n, 0, g(n-i, i-1, k-1, [l[], i]))))
        end:
    A:= proc(n, k) option remember; `if`(k<0, 0, g(n, n, k, [])) end:
    T:= (n, k)-> A(n, k) -A(n, k-1):
    seq(seq(T(n, k), k=0..floor((sqrt(1+8*n)-1)/2)), n=0..20);
  • Mathematica
    h[l_] := With[{n = Length[l]}, Sum[i, {i, l}]!/Product[Product[1+l[[i]] - j + Sum[If[l[[k]] >= j, 1, 0], {k, i+1, n}], {j, 1, l[[i]]}], {i, 1, n}] ];
    g[n_, i_, k_, l_] := If[n == 0, h[l], If[n > k*(i-(k-1)/2), 0, g[n, i-1, Min[k, i-1], l] + If[i > n, 0, g[n-i, i-1, k-1, Append[l, i]]]]];
    a[n_, k_] := a[n, k] = If[k < 0, 0, g[n, n, k, {}]];
    t[n_, k_] := a[n, k] - a[n, k-1];
    Table[Table[t[n, k], {k, 0, Floor[(Sqrt[1+8*n]-1)/2]}], {n, 0, 20}] // Flatten (* Jean-François Alcover, Dec 17 2013, translated from Maple *)

A050600 Recursion counts for summation table A003056 with formula a(y,0) = y, a(y,x) = a((y XOR x),2*(y AND x)).

Original entry on oeis.org

0, 1, 0, 1, 2, 0, 1, 1, 1, 0, 1, 3, 2, 3, 0, 1, 1, 2, 2, 1, 0, 1, 2, 1, 2, 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 4, 3, 4, 2, 4, 3, 4, 0, 1, 1, 3, 3, 2, 2, 3, 3, 1, 0, 1, 2, 1, 3, 2, 2, 2, 3, 1, 2, 0, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 0, 1, 3, 2, 3, 1, 3, 2, 3, 1, 3, 2, 3, 0, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 0
Offset: 0

Views

Author

Antti Karttunen, Jun 22 1999

Keywords

Comments

Count the summation table A003056 with recursive formula based on identity A+B = (A XOR B)+ 2*(A AND B) given by Schroeppel and then this table gives the number of recursion steps to get the final result.
For k=1..n-1: T(n,k) = T(n,n-k) = A080080(n-k,k) + 1. - Reinhard Zumkeller, Aug 03 2014

Crossrefs

Column 1: A001511, column 2: A050603, column 3: A050604.
Cf. A050601, A050602, A003056, A048720 (for the Maple implementation of trinv and XORnos, ANDnos)
Cf. A080080.

Programs

  • Haskell
    import Data.Bits (xor, (.&.), shiftL)
    a050600 n k = adder 0 (n - k) k where
       adder :: Int -> Int -> Int -> Int
       adder c u 0 = c
       adder c u v = adder (c + 1) (u `xor` v) (shiftL (u .&. v) 1)
    a050600_row n = map (a050600 n) $ reverse [0..n]
    a050600_tabl = map a050600_row [0..]
    -- Reinhard Zumkeller, Aug 02 2014
  • Maple
    add1c := proc(a,b) option remember; if(0 = b) then RETURN(0); else RETURN(1+add_c(XORnos(a,b),2*ANDnos(a,b))); fi; end;
  • Mathematica
    trinv[n_] := Floor[(1 + Sqrt[1 + 8*n])/2];
    add1c[a_, b_] := add1c[a, b] = If[b == 0, 0, 1 + add1c[BitXor[a, b], 2*BitAnd[a, b]]];
    a[n_] := add1c[n - (trinv[n]*(trinv[n] - 1))/2, (trinv[n] - 1)* ((1/2)*trinv[n] + 1) - n];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Sep 21 2021, after Maple code *)

Formula

a(n) -> add1c( (n-((trinv(n)*(trinv(n)-1))/2)), (((trinv(n)-1)*(((1/2)*trinv(n))+1))-n) )

A385001 Irregular triangle read by rows: T(n,k) is the number of partitions of n with k designated summands, n >= 0, 0 <= k <= A003056(n).

Original entry on oeis.org

1, 0, 1, 0, 3, 0, 4, 1, 0, 7, 3, 0, 6, 9, 0, 12, 15, 1, 0, 8, 30, 3, 0, 15, 45, 9, 0, 13, 67, 22, 0, 18, 99, 42, 1, 0, 12, 135, 81, 3, 0, 28, 175, 140, 9, 0, 14, 231, 231, 22, 0, 24, 306, 351, 51, 0, 24, 354, 551, 97, 1, 0, 31, 465, 783, 188, 3, 0, 18, 540, 1134, 330, 9
Offset: 0

Views

Author

Omar E. Pol, Jul 17 2025

Keywords

Comments

The divisor function sigma_1(n) = A000203(n) is also the number of partitions of n with only one designated summand, n >= 1.
When part i has multiplicity j > 0 exactly one part i is "designated".
The length of the row n is A002024(n+1) = 1 + A003056(n), hence the first positive element in column k is in the row A000217(k).
Alternating row sums give A329157.
Columns converge to A000716.
This triangle equals A060043 with reversed rows and an additional column 0.

Examples

			Triangle begins:
--------------------------------------------
   n\k:   0    1     2     3     4    5   6
--------------------------------------------
   0 |    1;
   1 |    0,   1;
   2 |    0,   3;
   3 |    0,   4,    1;
   4 |    0,   7,    3;
   5 |    0,   6,    9;
   6 |    0,  12,   15,    1;
   7 |    0,   8,   30,    3;
   8 |    0,  15,   45,    9;
   9 |    0,  13,   67,   22;
  10 |    0,  18,   99,   42,    1;
  11 |    0,  12,  135,   81,    3;
  12 |    0,  28,  175,  140,    9;
  13 |    0,  14,  231,  231,   22;
  14 |    0,  24,  306,  351,   51;
  15 |    0,  24,  354,  551,   97,   1;
  16 |    0,  31,  465,  783,  188,   3;
  17 |    0,  18,  540, 1134,  330,   9;
  18 |    0,  39,  681, 1546,  568,  22;
  19 |    0,  20,  765, 2142,  918,  51;
  20 |    0,  42,  945, 2835, 1452, 108;
  21 |    0,  32, 1040, 3758, 2233, 208,  1;
  ...
For n = 6 and k = 1 there are 12 partitions of 6 with only one designated summand as shown below:
   6'
   3'+ 3
   3 + 3'
   2'+ 2 + 2
   2 + 2'+ 2
   2 + 2 + 2'
   1'+ 1 + 1 + 1 + 1 + 1
   1 + 1'+ 1 + 1 + 1 + 1
   1 + 1 + 1'+ 1 + 1 + 1
   1 + 1 + 1 + 1'+ 1 + 1
   1 + 1 + 1 + 1 + 1'+ 1
   1 + 1 + 1 + 1 + 1 + 1'
So T(6,1) = 12, the same as A000203(6) = 12.
.
For n = 6 and k = 2 there are 15 partitions of 6 with two designated summands as shown below:
   5'+ 1'
   4'+ 2'
   4'+ 1'+ 1
   4'+ 1 + 1'
   3'+ 1'+ 1 + 1
   3'+ 1 + 1'+ 1
   3'+ 1 + 1 + 1'
   2'+ 2 + 1'+ 1
   2'+ 2 + 1 + 1'
   2 + 2'+ 1'+ 1
   2 + 2'+ 1 + 1'
   2'+ 1'+ 1 + 1 + 1
   2'+ 1 + 1'+ 1 + 1
   2'+ 1 + 1 + 1'+ 1
   2'+ 1 + 1 + 1 + 1'
So T(6,2) = 15, the same as A002127(6) = 15.
.
For n = 6 and k = 3 there is only one partition of 6 with three designated summands as shown below:
   3'+ 2'+ 1'
So T(6,3) = 1, the same as A002128(6) = 1.
There are 28 partitions of 6 with designated summands, so A077285(6) = 28.
.
		

Crossrefs

Columns: A000007 (k=0), A000203 (k=1), A002127 (k=2), A002128 (k=3), A365664 (k=4), A365665 (k=5), A384926 (k=6).
Row sums give A077285.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1)+add(expand(b(n-i*j, i-1)*j*x), j=1..n/i)))
        end:
    T:= n-> (p-> seq(coeff(p,x,i), i=0..degree(p)))(b(n$2)):
    seq(T(n), n=0..20);  # Alois P. Heinz, Jul 18 2025

Formula

From Alois P. Heinz, Jul 18 2025: (Start)
Sum_{k>=1} k * T(n,k) = A293421(n).
T(A000096(n),n) = A000716(n). (End)
G.f.: Product_{i>0} 1 + (y*x^i)/(1 - x^i)^2. - John Tyler Rascoe, Jul 23 2025
Conjecture: For fixed k >= 1, Sum_{j=1..n} T(j,k) ~ Pi^(2*k) * n^(2*k) / ((2*k)! * (2*k+1)!). - Vaclav Kotesovec, Aug 01 2025
Showing 1-10 of 380 results. Next