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 54 results. Next

A182612 Number of conjugacy classes in GL(n,27).

Original entry on oeis.org

1, 26, 728, 19656, 531414, 14348152, 387419760, 10460332792, 282429516096, 7625596933890, 205891131543552, 5559060551656248, 150094635282119528, 4052555152616676888, 109418989131110078784, 2954312706539971597184, 79766443076861647780830
Offset: 0

Views

Author

Klaus Brockhaus, Nov 23 2010

Keywords

Crossrefs

Programs

  • Magma
    /* The program does not work for n>4: */ [1] cat [ NumberOfClasses(GL(n, 27)) : n in [1..4] ];
    
  • Maple
    with(numtheory):
    b:= proc(n) b(n):= add(phi(d)*27^(n/d), d=divisors(n))/n-1 end:
    a:= proc(n) a(n):= `if`(n=0, 1,
           add(add(d*b(d), d=divisors(j)) *a(n-j), j=1..n)/n)
        end:
    seq(a(n), n=0..20);  # Alois P. Heinz, Nov 03 2012
  • Mathematica
    b[n_] := Sum[EulerPhi[d]*27^(n/d), {d, Divisors[n]}]/n-1; a[n_] := a[n] = If[n == 0, 1, Sum[Sum[d*b[d], {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Feb 17 2014, after Alois P. Heinz *)
  • PARI
    N=66; x='x+O('x^N);
    gf=prod(n=1,N, (1-x^n)/(1-27*x^n)  );
    v=Vec(gf)
    /* Joerg Arndt, Jan 24 2013 */

Formula

G.f.: Product_{k>=1} (1-x^k)/(1-27*x^k). - Alois P. Heinz, Nov 03 2012

Extensions

More terms from Alois P. Heinz, Nov 03 2012
MAGMA code edited by Vincenzo Librandi, Jan 24 2013

A182610 Number of conjugacy classes in GL(n,23).

Original entry on oeis.org

1, 22, 528, 12144, 279818, 6435792, 148035360, 3404812752, 78310972608, 1801152369478, 41426510921664, 952809751186128, 21914624425304688, 504036361781716368, 11592836324384010432, 266635235460831961152, 6132610415677439376122, 141050039560581098947824
Offset: 0

Views

Author

Klaus Brockhaus, Nov 23 2010

Keywords

Crossrefs

Programs

  • Magma
    /* The program does not work for n>4: */ [1] cat [NumberOfClasses(GL(n, 23)) : n in [1..4]];
    
  • Maple
    with(numtheory):
    b:= proc(n) b(n):= add(phi(d)*23^(n/d), d=divisors(n))/n-1 end:
    a:= proc(n) a(n):= `if`(n=0, 1,
           add(add(d*b(d), d=divisors(j)) *a(n-j), j=1..n)/n)
        end:
    seq(a(n), n=0..20);  # Alois P. Heinz, Nov 03 2012
  • Mathematica
    b[n_] := Sum[EulerPhi[d]*23^(n/d), {d, Divisors[n]}]/n-1; a[n_] := a[n] = If[n == 0, 1, Sum[Sum[d*b[d], {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Feb 17 2014, after Alois P. Heinz *)
  • PARI
    N=66; x='x+O('x^N);
    gf=prod(n=1,N, (1-x^n)/(1-23*x^n)  );
    v=Vec(gf)
    /* Joerg Arndt, Jan 24 2013 */

Formula

G.f.: Product_{k>=1} (1-x^k)/(1-23*x^k). - Alois P. Heinz, Nov 03 2012

Extensions

More terms from Alois P. Heinz, Nov 03 2012
MAGMA code edited by Vincenzo Librandi, Jan 24 2013

A182611 Number of conjugacy classes in GL(n,25).

Original entry on oeis.org

1, 24, 624, 15600, 390600, 9764976, 244140000, 6103499376, 152587874400, 3814696859400, 95367431234400, 2384185780844400, 59604644765235024, 1490116119130470000, 37252902984364860000, 931322574609121110624, 23283064365380605500600, 582076609134515127375600
Offset: 0

Views

Author

Klaus Brockhaus, Nov 23 2010

Keywords

Crossrefs

Programs

  • Magma
    /* The program does not work for n>4: */ [1] cat [NumberOfClasses(GL(n, 25)) : n in [1..4]];
    
  • Maple
    with(numtheory):
    b:= proc(n) b(n):= add(phi(d)*25^(n/d), d=divisors(n))/n-1 end:
    a:= proc(n) a(n):= `if`(n=0, 1,
           add(add(d*b(d), d=divisors(j)) *a(n-j), j=1..n)/n)
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Nov 03 2012
  • Mathematica
    b[n_] := Sum[EulerPhi[d]*25^(n/d), {d, Divisors[n]}]/n-1; a[n_] := a[n] = If[n == 0, 1, Sum[Sum[d*b[d], {d, Divisors[j]}]*a[n-j], {j, 1, n}]/n]; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 17 2014, after Alois P. Heinz *)
  • PARI
    N=66; x='x+O('x^N);
    gf=prod(n=1,N, (1-x^n)/(1-25*x^n)  );
    v=Vec(gf)
    /* Joerg Arndt, Jan 24 2013 */

Formula

G.f.: Product_{k>=1} (1-x^k)/(1-25*x^k). - Alois P. Heinz, Nov 03 2012

Extensions

More terms from Alois P. Heinz, Nov 03 2012
MAGMA code edited by Vincenzo Librandi, Jan 23 2013

A336130 Number of ways to split a strict composition of n into contiguous subsequences all having the same sum.

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 15, 13, 23, 27, 73, 65, 129, 133, 241, 375, 519, 617, 1047, 1177, 1859, 2871, 3913, 4757, 7653, 8761, 13273, 16155, 28803, 30461, 50727, 55741, 87743, 100707, 152233, 168425, 308937, 315973, 500257, 571743, 871335, 958265, 1511583, 1621273, 2449259, 3095511, 4335385, 4957877, 7554717, 8407537, 12325993, 14301411, 20348691, 22896077, 33647199, 40267141, 56412983, 66090291, 93371665, 106615841, 155161833
Offset: 0

Views

Author

Gus Wiseman, Jul 11 2020

Keywords

Examples

			The a(1) = 1 through a(7) = 13 splits:
  (1)  (2)  (3)    (4)    (5)    (6)        (7)
            (1,2)  (1,3)  (1,4)  (1,5)      (1,6)
            (2,1)  (3,1)  (2,3)  (2,4)      (2,5)
                          (3,2)  (4,2)      (3,4)
                          (4,1)  (5,1)      (4,3)
                                 (1,2,3)    (5,2)
                                 (1,3,2)    (6,1)
                                 (2,1,3)    (1,2,4)
                                 (2,3,1)    (1,4,2)
                                 (3,1,2)    (2,1,4)
                                 (3,2,1)    (2,4,1)
                                 (1,2),(3)  (4,1,2)
                                 (2,1),(3)  (4,2,1)
                                 (3),(1,2)
                                 (3),(2,1)
		

Crossrefs

The version with different instead of equal sums is A336128.
Starting with a non-strict composition gives A074854.
Starting with a partition gives A317715.
Starting with a strict partition gives A318683.
Set partitions with equal block-sums are A035470.
Partitions of partitions are A001970.
Partitions of compositions are A075900.
Compositions of compositions are A133494.
Compositions of partitions are A323583.

Programs

  • Mathematica
    splits[dom_]:=Append[Join@@Table[Prepend[#,Take[dom,i]]&/@splits[Drop[dom,i]],{i,Length[dom]-1}],{dom}];
    Table[Sum[Length[Select[splits[ctn],SameQ@@Total/@#&]],{ctn,Join@@Permutations/@Select[IntegerPartitions[n],UnsameQ@@#&]}],{n,0,15}]

Extensions

a(31)-a(60) from Max Alekseyev, Feb 14 2024

A074854 a(n) = Sum_{d|n} (2^(n-d)).

Original entry on oeis.org

1, 3, 5, 13, 17, 57, 65, 209, 321, 801, 1025, 3905, 4097, 12417, 21505, 53505, 65537, 233985, 262145, 885761, 1327105, 3147777, 4194305, 16060417, 17825793, 50339841, 84148225, 220217345, 268435457, 990937089, 1073741825, 3506503681
Offset: 1

Views

Author

Miklos Kristof, Sep 11 2002

Keywords

Comments

A034729 = Sum_{d|n} (2^(d-1)).
If p is a prime, then a(p) = A034729(p) = 2^(p-1)+1.
From Gus Wiseman, Jul 14 2020: (Start)
Number of ways to tile a rectangle of size n using horizontal strips. Also the number of ways to choose a composition of each part of a constant partition of n. The a(0) = 1 through a(5) = 17 splittings are:
() (1) (2) (3) (4) (5)
(1,1) (1,2) (1,3) (1,4)
(1),(1) (2,1) (2,2) (2,3)
(1,1,1) (3,1) (3,2)
(1),(1),(1) (1,1,2) (4,1)
(1,2,1) (1,1,3)
(2,1,1) (1,2,2)
(2),(2) (1,3,1)
(1,1,1,1) (2,1,2)
(1,1),(2) (2,2,1)
(2),(1,1) (3,1,1)
(1,1),(1,1) (1,1,1,2)
(1),(1),(1),(1) (1,1,2,1)
(1,2,1,1)
(2,1,1,1)
(1,1,1,1,1)
(1),(1),(1),(1),(1)
(End)

Examples

			Divisors of 6 = 1,2,3,6 and 6-1 = 5, 6-2 = 4, 6-3 = 3, 6-6 = 0. a(6) = 2^5 + 2^4 + 2^3 + 2^0 = 32 + 16 + 8 + 1 = 57.
G.f. = x + 3*x^2 + 5*x^3 + 13*x^4 + 17*x^5 + 57*x^6 + 65*x^7 + ...
a(14) = 1 + 2^7 + 2^12 + 2^13 = 12417. - _Gus Wiseman_, Jun 20 2018
		

Crossrefs

Cf. A080267.
Cf. A051731.
The version looking at lengths instead of sums is A101509.
The strictly increasing (or strictly decreasing) version is A304961.
Starting with a partition gives A317715.
Starting with a strict partition gives A318683.
Requiring distinct instead of equal sums gives A336127.
Starting with a strict composition gives A336130.
Partitions of partitions are A001970.
Splittings of compositions are A133494.
Splittings of partitions are A323583.

Programs

  • Mathematica
    a[ n_] := If[ n < 1, 0, Sum[ 2^(n - d), {d, Divisors[n]}]] (* Michael Somos, Mar 28 2013 *)
  • PARI
    a(n)=if(n<1,0,2^n*polcoeff(sum(k=1,n,2/(2-x^k),x*O(x^n)),n))
    
  • PARI
    a(n) = sumdiv(n,d, 2^(n-d) ); /* Joerg Arndt, Mar 28 2013 */

Formula

G.f.: 2^n times coefficient of x^n in Sum_{k>=1} x^k/(2-x^k). - Benoit Cloitre, Apr 21 2003; corrected by Joerg Arndt, Mar 28 2013
G.f.: Sum_{k>0} 2^(k-1)*x^k/(1-2^(k-1)*x^k). - Vladeta Jovovic, Jun 24 2003
G.f.: Sum_{n>=1} a*z^n/(1-a*z^n) (generalized Lambert series) where z=2*x and a=1/2. - Joerg Arndt, Jan 30 2011
Triangle A051731 mod 2 converted to decimal. - Philippe Deléham, Oct 04 2003
G.f.: Sum_{k>0} 1 / (2 / (2*x)^k - 1). - Michael Somos, Mar 28 2013

Extensions

a(14) corrected from 9407 to 12417 by Gus Wiseman, Jun 20 2018

A336135 Number of ways to split an integer partition of n into contiguous subsequences with strictly decreasing sums.

Original entry on oeis.org

1, 1, 2, 5, 8, 16, 29, 50, 79, 135, 213, 337, 522, 796, 1191, 1791, 2603, 3799, 5506, 7873, 11154, 15768, 21986, 30565, 42218, 57917, 78968, 107399, 144932, 194889, 261061, 347773, 461249, 610059, 802778, 1053173, 1377325, 1793985, 2329009, 3015922, 3891142
Offset: 0

Views

Author

Gus Wiseman, Jul 11 2020

Keywords

Examples

			The a(1) = 1 through a(5) = 16 splittings:
  (1)  (2)    (3)        (4)          (5)
       (1,1)  (2,1)      (2,2)        (3,2)
              (1,1,1)    (3,1)        (4,1)
              (2),(1)    (2,1,1)      (2,2,1)
              (1,1),(1)  (3),(1)      (3,1,1)
                         (1,1,1,1)    (3),(2)
                         (2,1),(1)    (4),(1)
                         (1,1,1),(1)  (2,1,1,1)
                                      (2,2),(1)
                                      (3),(1,1)
                                      (3,1),(1)
                                      (1,1,1,1,1)
                                      (2,1),(1,1)
                                      (2,1,1),(1)
                                      (1,1,1),(1,1)
                                      (1,1,1,1),(1)
		

Crossrefs

The version with equal sums is A317715.
The version with strictly increasing sums is A336134.
The version with weakly increasing sums is A336136.
The version with weakly decreasing sums is A316245.
The version with different sums is A336131.
Starting with a composition gives A304961.
Starting with a strict partition gives A318684.
Partitions of partitions are A001970.
Partitions of compositions are A075900.
Compositions of compositions are A133494.
Compositions of partitions are A323583.

Programs

  • Mathematica
    splits[dom_]:=Append[Join@@Table[Prepend[#,Take[dom,i]]&/@splits[Drop[dom,i]],{i,Length[dom]-1}],{dom}];
    Table[Sum[Length[Select[splits[ctn],Greater@@Total/@#&]],{ctn,IntegerPartitions[n]}],{n,0,10}]
  • PARI
    a(n)={my(recurse(r,m,s,t,f)=if(m==0, r==0, if(f, self()(r,min(m,t-1),t-1,0,0)) + self()(r,m-1,s,t,0) + if(t+m<=s, self()(r-m,min(m,r-m),s,t+m,1)))); recurse(n,n,n,0)} \\ Andrew Howroyd, Jan 18 2024

Extensions

a(21) onwards from Andrew Howroyd, Jan 18 2024

A364912 Triangle read by rows where T(n,k) is the number of ways to write n as a positive linear combination of an integer partition of k.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 4, 4, 5, 0, 1, 4, 8, 7, 7, 0, 1, 6, 13, 17, 12, 11, 0, 1, 6, 18, 28, 30, 19, 15, 0, 1, 8, 24, 50, 58, 53, 30, 22
Offset: 0

Views

Author

Gus Wiseman, Aug 20 2023

Keywords

Comments

A way of writing n as a positive linear combination of a finite sequence y is any sequence of pairs (k_i,y_i) such that k_i > 0 and Sum k_i*y_i = n. For example, the pairs ((3,1),(1,1),(2,2)) are a way of writing 8 as a positive linear combination of (1,1,2), namely 8 = 3*1 + 1*1 + 2*2.

Examples

			Triangle begins:
  1
  0  1
  0  1  2
  0  1  2  3
  0  1  4  4  5
  0  1  4  8  7  7
  0  1  6 13 17 12 11
  0  1  6 18 28 30 19 15
  0  1  8 24 50 58 53 30 22
Row n = 4 counts the following linear combinations:
  .  1*4  2*2      2*1+1*2      4*1
          1*1+1*3  1*1+1*1+1*2  3*1+1*1
          1*2+1*2  1*1+1*2+1*1  2*1+2*1
          1*3+1*1  1*2+1*1+1*1  2*1+1*1+1*1
                                1*1+1*1+1*1+1*1
Row n = 5 counts the following linear combinations:
  .  1*5  1*1+1*4  2*1+1*3      3*1+1*2          5*1
          1*2+1*3  2*2+1*1      2*1+1*1+1*2      4*1+1*1
          1*3+1*2  1*1+1*1+1*3  2*1+1*2+1*1      3*1+2*1
          1*4+1*1  1*1+1*2+1*2  1*1+1*1+1*1+1*2  3*1+1*1+1*1
                   1*1+1*3+1*1  1*1+1*1+1*2+1*1  2*1+2*1+1*1
                   1*2+1*1+1*2  1*1+1*2+1*1+1*1  2*1+1*1+1*1+1*1
                   1*2+1*2+1*1  1*2+1*1+1*1+1*1  1*1+1*1+1*1+1*1+1*1
                   1*3+1*1+1*1
Array begins:
  1   0   0   0    0    0    0     0
  1   1   1   1    1    1    1     1
  2   2   4   4    6    6    8     8
  3   4   8   13   18   24   33    40
  5   7   17  28   50   70   107   143
  7   12  30  58   108  179  286   428
  11  19  53  109  223  394  696   1108
  15  30  86  194  420  812  1512  2619
		

Crossrefs

Row k = 0 is A000007.
Row k = 1 is A000012.
Column n = 0 is A000041.
Column n = 1 is A000070.
Row sums are A006951.
Row k = 2 is A052928 except initial terms.
The case of strict integer partitions is A116861.
Central column is T(2n,n) = A(n,n) = A364907(n).
With rows reversed we have the nonnegative version A365004.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A364350 counts combination-free strict partitions, complement A364839.
A364913 counts combination-full partitions.

Programs

  • Mathematica
    combp[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,1,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Join@@Table[combp[n,ptn],{ptn,IntegerPartitions[k]}]],{n,0,6},{k,0,n}]
    - or -
    combs[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,0,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Length[Join@@Table[combs[n-k,ptn],{ptn,IntegerPartitions[k]}]],{n,0,6},{k,0,n}]

Formula

As an array, also the number of ways to write n-k as a nonnegative linear combination of an integer partition of k (see programs).

A365002 Number of ways to write n as a nonnegative linear combination of a strict integer partition.

Original entry on oeis.org

1, 1, 2, 4, 8, 10, 26, 32, 63, 84, 157, 207, 383, 477, 768, 1108, 1710, 2261, 3536, 4605, 6869, 9339, 13343, 17653, 25785, 33463, 46752, 61549, 85614, 110861, 153719, 197345, 268623, 346845, 463513, 593363, 797082, 1011403, 1335625, 1703143, 2232161, 2820539
Offset: 0

Views

Author

Gus Wiseman, Aug 22 2023

Keywords

Comments

A way of writing n as a (nonnegative) linear combination of a finite sequence y is any sequence of pairs (k_i,y_i) such that k_i >= 0 and Sum k_i*y_i = n. For example, the pairs ((3,1),(1,1),(1,1),(0,2)) are a way of writing 5 as a linear combination of (1,1,1,2), namely 5 = 3*1 + 1*1 + 1*1 + 0*2. Of course, there are A000041(n) ways to write n as a linear combination of (1..n).

Examples

			The a(1) = 1 through a(5) = 10 ways:
  1*1  1*2  1*3      1*4      1*5
       2*1  3*1      2*2      5*1
            0*2+3*1  4*1      0*2+5*1
            1*2+1*1  0*2+4*1  0*3+5*1
                     0*3+4*1  0*4+5*1
                     1*2+2*1  1*2+3*1
                     1*3+1*1  1*3+1*2
                     2*2+0*1  1*3+2*1
                              1*4+1*1
                              2*2+1*1
		

Crossrefs

Row sums of lower-left half of A364916 as an array.
Column sums of right half of A364916 as a triangle.
For all positive coefficients we have A000041, non-strict A006951.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A364350 counts combination-free strict partitions, complement A364839.
A364913 counts combination-full partitions.

Programs

  • Mathematica
    combs[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,0,Floor[n/k]}]}, Select[Tuples[s],Total[Times@@@#]==n&]];
    Table[Sum[Length[combs[n,y]], {y,Select[Join@@IntegerPartitions/@Range[n], UnsameQ@@#&]}],{n,0,15}]
  • Python
    from itertools import combinations
    from collections import Counter
    from sympy.utilities.iterables import partitions
    def A365002(n):
        aset = Counter(tuple(sorted(set(p))) for p in partitions(n))
        return sum(sum(aset[t] for t in aset if set(t).issubset(set(q))) for l in range(1,n+1) for q in combinations(range(1,n+1),l) if sum(q)<=n) # Chai Wah Wu, Sep 20 2023

Extensions

a(16)-a(34) from Chai Wah Wu, Sep 20 2023
a(35)-a(38) from Chai Wah Wu, Sep 21 2023
a(0)=1 and a(39)-a(41) from Alois P. Heinz, Jan 11 2024

A336132 Number of ways to split a strict integer partition of n into contiguous subsequences all having different sums.

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 8, 11, 14, 21, 30, 37, 51, 66, 86, 120, 146, 186, 243, 303, 378, 495, 601, 752, 927, 1150, 1395, 1741, 2114, 2571, 3134, 3788, 4541, 5527, 6583, 7917, 9511, 11319, 13448, 16040, 18996, 22455, 26589, 31317, 36844, 43518, 50917, 59655, 69933
Offset: 0

Views

Author

Gus Wiseman, Jul 11 2020

Keywords

Examples

			The a(1) = 1 through a(7) = 14 splits:
  (1)  (2)  (3)      (4)      (5)      (6)          (7)
            (2,1)    (3,1)    (3,2)    (4,2)        (4,3)
            (2),(1)  (3),(1)  (4,1)    (5,1)        (5,2)
                              (3),(2)  (3,2,1)      (6,1)
                              (4),(1)  (4),(2)      (4,2,1)
                                       (5),(1)      (4),(3)
                                       (3,2),(1)    (5),(2)
                                       (3),(2),(1)  (6),(1)
                                                    (4),(2,1)
                                                    (4,2),(1)
                                                    (4),(2),(1)
		

Crossrefs

The version with equal instead of different sums is A318683.
Starting with a composition gives A336127.
Starting with a strict composition gives A336128.
Starting with a partition gives A336131.
Partitions of partitions are A001970.
Partitions of compositions are A075900.
Compositions of compositions are A133494.
Compositions of partitions are A323583.

Programs

  • Mathematica
    splits[dom_]:=Append[Join@@Table[Prepend[#,Take[dom,i]]&/@splits[Drop[dom,i]],{i,Length[dom]-1}],{dom}];
    Table[Sum[Length[Select[splits[ctn],UnsameQ@@Total/@#&]],{ctn,Select[IntegerPartitions[n],UnsameQ@@#&]}],{n,0,30}]

A365004 Array read by antidiagonals downwards where A(n,k) is the number of ways to write n as a nonnegative linear combination of an integer partition of k.

Original entry on oeis.org

1, 1, 0, 2, 1, 0, 3, 2, 1, 0, 5, 4, 4, 1, 0, 7, 7, 8, 4, 1, 0, 11, 12, 17, 13, 6, 1, 0, 15, 19, 30, 28, 18, 6, 1, 0, 22, 30, 53, 58, 50, 24, 8, 1, 0, 30, 45, 86, 109, 108, 70, 33, 8, 1, 0, 42, 67, 139, 194, 223, 179, 107, 40, 10, 1, 0, 56, 97, 213, 328, 420, 394, 286, 143, 50, 10, 1, 0
Offset: 0

Views

Author

Gus Wiseman, Aug 23 2023

Keywords

Comments

A way of writing n as a (nonnegative) linear combination of a finite sequence y is any sequence of pairs (k_i,y_i) such that k_i >= 0 and Sum k_i*y_i = n. For example, the pairs ((3,1),(1,1),(1,1),(0,2)) are a way of writing 5 as a linear combination of (1,1,1,2), namely 5 = 3*1 + 1*1 + 1*1 + 0*2. Of course, there are A000041(n) ways to write n as a linear combination of (1..n).

Examples

			Array begins:
  1  1  2   3   5    7     11
  0  1  2   4   7    12    19
  0  1  4   8   17   30    53
  0  1  4   13  28   58    109
  0  1  6   18  50   108   223
  0  1  6   24  70   179   394
  0  1  8   33  107  286   696
  0  1  8   40  143  428   1108
  0  1  10  50  199  628   1754
  0  1  10  61  254  882   2622
  0  1  12  72  332  1215  3857
  0  1  12  84  410  1624  5457
  0  1  14  99  517  2142  7637
The A(4,2) = 6 ways:
  2*2
  0*1+4*1
  1*1+3*1
  2*1+2*1
  3*1+1*1
  4*1+0*1
		

Crossrefs

Row n = 0 is A000041, strict A000009.
Row n = 1 is A000070.
Column k = 0 is A000007.
Column k = 1 is A000012.
Column k = 2 is A052928 except initial terms.
Antidiagonal sums are A006951.
The case of strict integer partitions is A116861.
Main diagonal is A364907.
The transpose is A364912, also the positive version.
A008284 counts partitions by length, strict A008289.
A364350 counts combination-free strict partitions, complement A364839.
A364913 counts combination-full partitions.

Programs

  • Maple
    b:= proc(n, i, m) option remember; `if`(n=0, `if`(m=0, 1, 0),
         `if`(i<1, 0, b(n, i-1, m)+add(b(n-i, min(i, n-i), m-i*j), j=0..m/i)))
        end:
    A:= (n, k)-> b(k$2, n):
    seq(seq(A(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, Jan 28 2024
  • Mathematica
    nn=5;
    combs[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,0,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]];
    tabv=Table[Length[Join@@Table[combs[n,ptn],{ptn,IntegerPartitions[k]}]],{n,0,nn},{k,0,nn}]
    Table[tabv[[k+1,n-k+1]],{n,0,nn},{k,0,n}]

Formula

Also the number of ways to write n-k as a *positive* linear combination of an integer partition of k.

Extensions

Antidiagonals 8-11 from Alois P. Heinz, Jan 28 2024
Previous Showing 21-30 of 54 results. Next