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 21-30 of 41 results. Next

A116595 Triangle read by rows: T(n,k) is the number of partitions of n having exactly k parts that appear exactly once (n>=0, k>=0).

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 4, 2, 4, 4, 2, 1, 2, 8, 4, 1, 6, 8, 6, 2, 5, 12, 10, 3, 9, 16, 12, 4, 1, 7, 23, 19, 6, 1, 16, 24, 25, 10, 2, 11, 40, 33, 14, 3, 22, 45, 41, 22, 5, 20, 59, 63, 27, 6, 1, 33, 72, 73, 42, 10, 1, 28, 99, 101, 53, 14, 2, 51, 108, 127, 75, 21, 3, 42, 153, 167
Offset: 0

Views

Author

Emeric Deutsch, Feb 18 2006

Keywords

Comments

Row n has 1+floor([sqrt(1+8n)-1]/2) terms. Row sums yield the partition numbers (A000041). T(n,0)=A007690(n). Sum(k*T(n,k),k>=0)=A024786(n+1).

Examples

			T(7,2) = 4 because we have [6,1], [5,2], [4,3], [3,2,1,1].
Triangle starts:
1;
0, 1;
1, 1;
1, 1,  1;
2, 2,  1;
1, 4,  2;
4, 4,  2,  1;
2, 8,  4,  1;
6, 8,  6,  2;
5, 12, 10, 3;
9, 16, 12, 4, 1;
		

Crossrefs

Programs

  • Maple
    g:=product(1+t*x^j+x^(2*j)/(1-x^j),j=1..40): gser:=simplify(series(g,x=0,23)): P[0]:=1: for n from 1 to 21 do P[n]:=sort(coeff(gser,x^n)) od: for n from 0 to 21 do seq(coeff(P[n],t,j),j=0..floor((sqrt(1+8*n)-1)/2)) od; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n, i) option remember; local j; if n=0 then 1
          elif i<1 then 0 else []; for j from 0 to n/i do zip((x, y)
          ->x+y, %, [`if`(j=1, 0, [][]), b(n-i*j, i-1)], 0) od; %[] fi
        end:
    T:= n-> b(n, n):
    seq(T(n), n=0..30);  # Alois P. Heinz, Nov 07 2012
  • Mathematica
    b[n_, i_] := b[n, i] = Module[{j, pc}, If[n == 0, pc = {1}, If[i<1, pc = {0}, pc = {}; For[j = 0, j <= n/i, j++, pc = Plus @@ PadRight[{pc, If[j == 1, {0}, {}] ~Join~ b[n-i*j, i-1]}]]; pc]]]; T[n_] := b[n, n]; Table[T[n], {n, 0, 30}] // Flatten (* Jean-François Alcover, Jan 31 2014, after Alois P. Heinz *)

Formula

G.f.: product(1+tx^j+x^(2j)/(1-x^j), j=1..infinity).
More generally, g.f. for the number of partitions of n having exactly k parts that appear exactly m times is product((t-1)*x^(m*j)+1/(1-x^j), j=1..infinity). - Vladeta Jovovic, Feb 21 2006

A194452 Total number of repeated parts in all partitions of n.

Original entry on oeis.org

0, 0, 2, 3, 8, 12, 24, 35, 60, 87, 136, 192, 287, 396, 567, 773, 1074, 1439, 1958, 2587, 3454, 4514, 5931, 7666, 9951, 12736, 16341, 20743, 26354, 33184, 41807, 52262, 65329, 81144, 100721, 124344, 153390, 188303, 230940, 282063, 344100, 418242, 507762
Offset: 0

Views

Author

Omar E. Pol, Nov 19 2011

Keywords

Examples

			For n = 6 we have:
--------------------------------------
.                        Number of
Partitions             repeated parts
--------------------------------------
6 .......................... 0
3 + 3 ...................... 2
4 + 2 ...................... 0
2 + 2 + 2 .................. 3
5 + 1 ...................... 0
3 + 2 + 1 .................. 0
4 + 1 + 1 .................. 2
2 + 2 + 1 + 1 .............. 4
3 + 1 + 1 + 1 .............. 3
2 + 1 + 1 + 1 + 1 .......... 4
1 + 1 + 1 + 1 + 1 + 1 ...... 6
------------------------------------
Total ..................... 24
So a(6) = 24.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local h, j, t;
          if n<0 then [0, 0]
        elif n=0 then [1, 0]
        elif i<1 then [0, 0]
        else h:= [0, 0];
             for j from 0 to iquo(n, i) do
               t:= b(n-i*j, i-1);
               h:= [h[1]+t[1], h[2]+t[2]+`if`(j<2, 0, t[1]*j)]
             od; h
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=0..50);  # Alois P. Heinz, Nov 20 2011
    g := add(x^(2*j)*(2-x^j)/(1-x^j), j = 1 .. 80)/mul(1-x^j, j = 1 .. 80): gser := series(g, x = 0, 50): seq(coeff(gser, x, n), n = 0 .. 45); # Emeric Deutsch, Feb 02 2016
  • Mathematica
    myCount[p_List] := Module[{t}, If[p == {}, 0, t = Transpose[Tally[p]][[2]]; Sum[If[t[[i]] == 1, 0, t[[i]]], {i, Length[t]}]]]; Table[Total[Table[myCount[p], {p, IntegerPartitions[i]}]], {i, 0, 20}] (* T. D. Noe, Nov 19 2011 *)
    b[n_, i_] := b[n, i] = Module[{h, j, t}, Which[n<0, {0, 0}, n==0, {1, 0}, i < 1, {0, 0}, True, h={0, 0}; For[j=0, j <= Quotient[n, i], j++, t = b[n - i*j, i-1]; h = {h[[1]]+t[[1]], h[[2]]+t[[2]] + If[j<2, 0, t[[1]]*j]}]; h] ]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Oct 25 2015, after Alois P. Heinz *)
    Table[Length[Flatten[Select[Flatten[Split[#]&/@IntegerPartitions[n],1],Length[#]>1&]]],{n,0,60}] (* Harvey P. Dale, Jun 12 2024 *)

Formula

a(n) = A006128(n) - A024786(n+1).
a(n) = Sum_{k=2..n} k*A264405(n,k). - Alois P. Heinz, Dec 07 2015
G.f.: g = Sum_{j>0} (x^{2*j}*(2 - x^j)/(1-x^j))/Product_{k>0}(1 - x^k) (obtained by logarithmic differentiation of the bivariate g.f. given in A264405). - Emeric Deutsch, Feb 02 2016

A117524 Total number of parts of multiplicity 3 in all partitions of n.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 3, 3, 7, 8, 13, 17, 25, 32, 48, 59, 83, 108, 145, 183, 247, 310, 406, 512, 659, 824, 1055, 1307, 1651, 2047, 2558, 3146, 3913, 4788, 5904, 7202, 8821, 10707, 13054, 15770, 19118, 23027, 27775, 33312, 40029, 47835, 57231, 68182, 81261
Offset: 1

Views

Author

Vladeta Jovovic, Apr 26 2006

Keywords

Examples

			a(9) = 7 because among the 30 (=A000041(9)) partitions of 9 only [6,(1,1,1)],[4,2,(1,1,1)],[(3,3,3)],[3,3,(1,1,1)],[3,(2,2,2)],[(2,2,2),(1,1,1)] contain parts of multiplicity 3 and their total number is 7 (shown between parentheses)
		

Crossrefs

Cf. A024786, A116646. Column k=3 of A197126.

Programs

  • Maple
    g:=(x^3/(1-x^3)-x^4/(1-x^4))/product(1-x^i,i=1..65): gser:=series(g,x=0,62): seq(coeff(gser,x,n),n=1..58); # Emeric Deutsch, Apr 29 2006

Formula

G.f. for total number of parts of multiplicity m in all partitions of n is (x^m/(1-x^m)-x^(m+1)/(1-x^(m+1)))/Product(1-x^i,i=1..infinity).
a(n) = Sum(k*A118806(n,k), k>=0). - Emeric Deutsch, Apr 29 2006
a(n) ~ exp(Pi*sqrt(2*n/3)) / (24*Pi*sqrt(2*n)). - Vaclav Kotesovec, May 24 2018

A073119 Total number of parts which are positive powers of 2 in all partitions of n.

Original entry on oeis.org

0, 1, 1, 4, 5, 10, 14, 26, 35, 56, 77, 116, 157, 226, 302, 424, 560, 762, 998, 1334, 1727, 2270, 2914, 3779, 4809, 6163, 7781, 9875, 12378, 15565, 19383, 24191, 29934, 37093, 45643, 56201, 68789, 84212, 102564, 124903, 151424, 183499, 221508
Offset: 1

Views

Author

Vladeta Jovovic, Aug 24 2002

Keywords

Examples

			a(5) = 5 because in the partitions [1,1,1,1,1], [1,1,1,2'], [1,2'2'], [1,1,3], [2',3],[1,4'], [5] we have 5 positive powers of 2 (they are marked). - _Emeric Deutsch_, Sep 19 2016.
		

Crossrefs

Programs

  • Maple
    p2:= proc(n) p2(n):= is(n=2^ilog2(n)) end: p2(1):= false:
    b:= proc(n, i) option remember; local t, l;
          if n<0 then [0, 0]
        elif n=0 then [1, 0]
        elif i<1 then [0, 0]
        else t:= b(n, i-1);
             l:= b(n-i, i);
             [t[1]+l[1], t[2]+l[2]+ `if`(p2(i), l[1], 0)]
          fi
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=1..50);  # Alois P. Heinz, Sep 29 2011
  • Mathematica
    Needs["DiscreteMath`Combinatorica`"]; f[n_] := Length[ Select[ Log[2, Flatten[ Partitions[n]]], IntegerQ[ # ] && # > 0 & ]]; Table[ f[n], {n, 1, 45}]
    a[n_] := Sum[IntegerExponent[k, 2]*PartitionsP[n-k], {k, 1, n}]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Jan 28 2014 *)

Formula

a(n) = Sum_{k=1..n} A007814(k)*A000041(n-k).
G.f.: g(x) = (Sum_{i>0} x^(h(i))/(1-x^(h(i))))/Product_{i>0}(1 - x^i), where h(i) = 2^i. - Emeric Deutsch, Sep 19 2016.
Conjecture: a(n) ~ exp(sqrt(2*n/3)*Pi)/(2*Pi*sqrt(2*n)) ~ p(n) * sqrt(6*n)/Pi, where p(n) is the partition function A000041. - Vaclav Kotesovec, Oct 07 2016

Extensions

Edited and extended by Robert G. Wilson v, Aug 26 2002

A213180 Sum over all partitions lambda of n of Sum_{p:lambda} p^m(p,lambda), where m(p,lambda) is the multiplicity of part p in lambda.

Original entry on oeis.org

0, 1, 3, 7, 16, 28, 59, 91, 170, 269, 450, 655, 1162, 1602, 2527, 3793, 5805, 8034, 12660, 17131, 26484, 37384, 53738, 73504, 114683, 153613, 221225, 313339, 453769, 609179, 927968, 1223909, 1804710, 2522264, 3539835, 4855420, 7439870, 9765555, 14009545
Offset: 0

Views

Author

Alois P. Heinz, Feb 27 2013

Keywords

Examples

			a(6) = 59: (1^6) + (2+1^4) + (2^2+1^2) + (2^3) + (3+1^3) + (3+2+1) + (3^2) + (4+1^2) + (4+2) + (5+1) + (6) = 1+3+5+8+4+6+9+5+6+6+6 = 59.
		

Crossrefs

Cf. A000070 (Sum 1), A006128 (Sum m), A014153 (Sum p), A024786 (Sum floor(1/m)), A066183 (Sum p^2*m), A066186 (Sum p*m), A073336 (Sum floor(m/p)), A116646 (Sum delta(m,2)), A117524 (Sum delta(m,3)), A103628 (Sum delta(m,1)*p), A117525 (Sum delta(m,2)*p), A197126, A213191.

Programs

  • Maple
    b:= proc(n, p) option remember; `if`(n=0, [1, 0], `if`(p<1, [0, 0],
          add((l->`if`(m=0, l, l+[0, l[1]*p^m]))(b(n-p*m, p-1)), m=0..n/p)))
        end:
    a:= n-> b(n, n)[2]:
    seq(a(n), n=0..40);
  • Mathematica
    b[n_, p_] := b[n, p] = If[n==0, {1, 0}, If[p<1, {0, 0}, Sum[Function[l, If[m==0, l, l+{0, l[[1]]*p^m}]][b[n-p*m, p-1]], {m, 0, n/p}]]]; a[n_] := b[n, n][[2]]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 15 2017, translated from Maple *)

Formula

From Vaclav Kotesovec, May 24 2018: (Start)
a(n) ~ c * 3^(n/3), where
c = 5.0144820680945600131204662934686439430547... if mod(n,3)=0
c = 4.6144523178014379613985400559486878971522... if mod(n,3)=1
c = 4.5237761454818383598444208605033385016299... if mod(n,3)=2
(End)

A264052 Triangle read by rows: T(n,k) (n>=0, 0<=k<=A259361(n)) is the number of integer partitions of n having k distinct parts occurring at least twice.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 3, 3, 4, 4, 6, 1, 5, 9, 1, 6, 13, 3, 8, 18, 4, 10, 23, 9, 12, 32, 12, 15, 42, 19, 1, 18, 55, 27, 1, 22, 69, 41, 3, 27, 89, 56, 4, 32, 112, 78, 9, 38, 141, 106, 12, 46, 175, 141, 23, 54, 217, 188, 31, 64, 266, 247, 49, 1, 76, 326, 321, 68, 1
Offset: 0

Views

Author

Christian Stump, Nov 01 2015

Keywords

Comments

Row sums give A000041.
T(n,k) is also the number of integer partitions of n having k parts from which one can subtract 2 and still get an integer partition (mapping a partition to its conjugate sends one statistic to the other).
T(n,k) is also the number of integer partitions of n having k distinct even parts. Example: T(6,2)= 1, counting the partition [2,4]. - Emeric Deutsch, Sep 19 2016

Examples

			Triangle begins:
   1,
   1,
   1,  1,
   2,  1,
   2,  3,
   3,  4,
   4,  6, 1,
   5,  9, 1,
   6, 13, 3,
   8, 18, 4,
  10, 23, 9,
  ...
T(6,2)= 1; namely [1,1,2,2]. - _Emeric Deutsch_, Sep 19 2016
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; expand(
          `if`(n=0, 1, `if`(i<1, 0, add(b(n-i*j, i-1)*
          `if`(j>1, x, 1), j=0..n/i))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n$2)):
    seq(T(n), n=0..25);  # Alois P. Heinz, Nov 02 2015
    # second Maple program:
    g := product((1-(1-t)*x^(2*j))/(1-x^j), j = 1 .. 80): gser := simplify(series(g, x = 0, 25)): for n from 0 to 23 do P[n] := sort(coeff(gser, x, n)) end do: for n from 0 to 23 do seq(coeff(P[n], t, i), i = 0 .. degree(P[n])) end do; # yields sequence in triangular form - Emeric Deutsch, Nov 12 2015
  • Mathematica
    T[n_, k_] := SeriesCoefficient[QPochhammer[1-t, x^2]/(t*QPochhammer[x]), {x, 0, n}, {t, 0, k}]; Table[DeleteCases[Table[T[n, k], {k, 0, n}], 0], {n, 0, 25}] // Flatten (* Jean-François Alcover, Dec 11 2016 *)

Formula

From Emeric Deutsch, Nov 12 2015: (Start)
G.f.: G(t,x) = Product_{j>=1} ((1-(1-t)x^{2j})/(1-x^j)).
T(n,0) = A000009(n).
T(n,1) = A090867(n).
Sum_{k>=0} k*T(n,k) = A024786(n).
(End)

Extensions

More terms from Alois P. Heinz, Nov 02 2015

A302347 a(n) = Sum of (Y(2,p)^2) over the partitions p of n, Y(2,p) = number of part sizes with multiplicity 2 or greater in p.

Original entry on oeis.org

0, 0, 1, 1, 3, 4, 10, 13, 25, 34, 59, 80, 127, 172, 260, 349, 505, 673, 946, 1248, 1711, 2238, 3010, 3902, 5162, 6637, 8663, 11051, 14253, 18051, 23047, 28988, 36677, 45840, 57538, 71485, 89082, 110062, 136269, 167487, 206138, 252132, 308640, 375777, 457698
Offset: 0

Views

Author

Emily Anible, Apr 05 2018

Keywords

Comments

This sequence is part of the contribution to the b^2 term of C_{1-b,2}(q) for(1-b,2)-colored partitions - partitions in which we can label parts any of an indeterminate 1-b colors, but are restricted to using only 2 of the colors per part size. This formula is known to match the Han/Nekrasov-Okounkov hooklength formula truncated at hooks of size two up to the linear term in b.
It is of interest to enumerate and determine specific characteristics of partitions of n, considering each partition individually.

Examples

			For a(6), we sum over partitions of six. For each partition, we count 1 for each part which appears more than once, then square the total in each partition.
6............0^2 = 0
5,1..........0^2 = 0
4,2..........0^2 = 0
4,1,1........1^2 = 1
3,3..........1^2 = 1
3,2,1........0^2 = 0
3,1,1,1......1^2 = 1
2,2,2........1^2 = 1
2,2,1,1......2^2 = 4
2,1,1,1,1....1^2 = 1
1,1,1,1,1,1..1^2 = 1
--------------------
Total.............10
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0 or i=1, (
          `if`(n>1, 1, 0)+p)^2, add(b(n-i*j, i-1,
          `if`(j>1, 1, 0)+p), j=0..n/i))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, Apr 05 2018
  • Mathematica
    Array[Total[Count[Split@ #, ?(Length@ # > 1 &)]^2 & /@ IntegerPartitions[#]] &, 44] (* _Michael De Vlieger, Apr 07 2018 *)
    b[n_, i_, p_] := b[n, i, p] = If[n == 0 || i == 1, (
         If[n > 1, 1, 0] + p)^2, Sum[b[n - i*j, i - 1,
         If[j > 1, 1, 0] + p], {j, 0, n/i}]];
    a[n_] := b[n, n, 0];
    a /@ Range[0, 60] (* Jean-François Alcover, Jun 06 2021, after Alois P. Heinz *)
  • Python
    def sum_square_freqs_greater_one(freq_list):
        tot = 0
        for f in freq_list:
            count = 0
            for i in f:
                if i > 1:
                    count += 1
            tot += count*count
        return tot
    def frequencies(partition, n):
        tot = 0
        freq_list = []
        i = 0
        for p in partition:
            freq = [0 for i in range(n+1)]
            for i in p:
                freq[i] += 1
            for f in freq:
                if f == 0:
                    tot += 1
            freq_list.append(freq)
        return freq_list

Formula

a(n) = Sum_{p in P(n)} (H(2,p)^2 + 2*A024786 - 2*A024788), where P(n) is the set of partitions of n, and H(2,p) is the hooks of length 2 in partition p.
G.f: (q^2*(1+q^4))/((1-q^2)*(1-q^4))*Product_{j>=1} 1/(1-q^j).
a(n) ~ sqrt(3) * exp(Pi*sqrt(2*n/3)) / (8*Pi^2). - Vaclav Kotesovec, May 22 2018

A330039 Number of essential lattice congruences of the weak order on the symmetric group S_n.

Original entry on oeis.org

1, 1, 4, 47, 3322, 11396000
Offset: 1

Views

Author

Torsten Muetze, Nov 28 2019

Keywords

Examples

			For n=3, the weak order on S_3 has the cover relations 123<132, 123<213, 132<312, 213<231, 312<321, 231<321, and there are a(3)=4 essential lattice congruences, namely {}, {132=312}, {213=231}, {132=312,213=231}.
		

Crossrefs

A116599 Triangle read by rows: T(n,k) is the number of partitions of n having exactly k parts equal to 2 (n>=0, 0<=k<=floor(n/2)).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 1, 1, 4, 2, 1, 6, 3, 1, 1, 8, 4, 2, 1, 11, 6, 3, 1, 1, 15, 8, 4, 2, 1, 20, 11, 6, 3, 1, 1, 26, 15, 8, 4, 2, 1, 35, 20, 11, 6, 3, 1, 1, 45, 26, 15, 8, 4, 2, 1, 58, 35, 20, 11, 6, 3, 1, 1, 75, 45, 26, 15, 8, 4, 2, 1, 96, 58, 35, 20, 11, 6, 3, 1, 1, 121, 75, 45, 26, 15, 8, 4, 2, 1
Offset: 0

Views

Author

Emeric Deutsch, Feb 18 2006

Keywords

Comments

Row n has 1 + floor(n/2) terms.
Row sums are the partition numbers (A000041).

Examples

			T(6,1)=3 because we have [4,2], [3,2,1] and [2,1,1,1,1].
Triangle starts:
1;
1;
1,1;
2,1;
3,1,1;
4,2,1;
6,3,1,1;
8,4,2,1;
		

Crossrefs

Programs

  • Maple
    with(combinat): T:=proc(n,k) if k=floor(n/2) then 1 elif k<=(n-2)/2 then numbpart(n-2*k)-numbpart(n-2*k-2) fi end: for n from 0 to 18 do seq(T(n,k),k=0..n) od; # yields sequence in triangular form
  • Mathematica
    nn = 20; p = Product[1/(1 - x^i), {i, 3, nn}]; f[list_] := Select[list, # > 0 &]; Map[f, CoefficientList[Series[p /(1 - x)/(1 - y x^2), {x, 0, nn}], {x, y}]] // Flatten  (* Geoffrey Critzer, Jan 22 2012 *)

Formula

T(n,0) = A027336(n), Sum_{k=0..floor(n/2)} k*T(n,k) = A024786(n).
Column k has g.f.: x^(2*k)/[(1-x)*Product_{j>=0} ((1-x^j))] (k=0,1,2,...).
G.f.: 1/[(1-x)*(1-t*x^2)*Product_{j>=3}( (1-x^j) )].
T(n,k) = p(n-2*k) - p(n-2*k-2) for k<=(n-2)/2;
T(n, floor(n/2))=1 (follows at once from the g.f.).

Extensions

Keyword tabl changed to tabf by Michel Marcus, Apr 09 2013

A200068 Irregular triangle read by rows: T(n,k), n>=0, 0<=k<=A200067(n), is number of compositions of n such that the sum of weighted inversions equals k and weights are products of absolute differences and distances between the element pairs which are not in sorted order.

Original entry on oeis.org

1, 1, 2, 3, 1, 5, 1, 1, 1, 7, 3, 1, 3, 0, 0, 2, 11, 4, 2, 4, 3, 1, 3, 0, 1, 1, 1, 0, 1, 15, 8, 3, 8, 3, 3, 7, 1, 2, 3, 1, 3, 2, 0, 1, 2, 0, 0, 1, 0, 1, 22, 11, 7, 12, 4, 5, 13, 5, 4, 7, 4, 4, 5, 0, 3, 6, 2, 1, 2, 1, 2, 3, 0, 0, 2, 1, 0, 0, 0, 0, 2
Offset: 0

Views

Author

Alois P. Heinz, Nov 13 2011

Keywords

Examples

			The compositions of n = 4 have weighted inversions 0: [4], [2,2], [1,3], [1,1,2], [1,1,1,1]; 1: [1,2,1]; 2: [3,1]; 3: [2,1,1];  => row 4 = [5,1,1,1].
Irregular triangle begins:
   1;
   1;
   2;
   3, 1;
   5, 1, 1, 1;
   7, 3, 1, 3, 0, 0, 2;
  11, 4, 2, 4, 3, 1, 3, 0, 1, 1, 1, 0, 1;
  15, 8, 3, 8, 3, 3, 7, 1, 2, 3, 1, 3, 2, 0, 1, 2, 0, 0, 1, 0, 1;
  ...
		

Crossrefs

Cf. A000041 (column k=0), A024786(n-1) (column k=1), A011782 (row sums), A200067 (row lengths -1), A189074.

Programs

  • Maple
    T:= proc(n) option remember; local mx, b, p;
          b:=proc(m, i, l) local h;
               if m=0 then p(i):= p(i)+1; if i>mx then mx:=i fi
             else seq(b(m-h, i +add(`if`(l[j]
    				
  • Mathematica
    T[n_] := T[n] = Module[{mx, b, p},
         b[m_, i_, l_] := Module[{h},
              If[m == 0, p[i] = p[i]+1; If[i > mx, mx = i],
              Table[b[m-h, i + Sum[If[l[[j]] < h, j*(h - l[[j]]), 0],
                   {j, 1, Length[l]}], Join[{h}, l]], {h, 1, m}]]];
         mx = 0;
         p[_] = 0;
         b[n, 0, {}]; Table[p[i], {i, 0, mx}]];
    Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Apr 25 2022, after Alois P. Heinz *)
Previous Showing 21-30 of 41 results. Next