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

A049286 Triangle of partitions v(d,c) defined in A002572.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 5, 4, 2, 1, 1, 9, 7, 4, 2, 1, 1, 16, 12, 7, 4, 2, 1, 1, 28, 22, 13, 7, 4, 2, 1, 1, 50, 39, 24, 13, 7, 4, 2, 1, 1, 89, 70, 42, 24, 13, 7, 4, 2, 1, 1, 159, 126, 76, 43, 24, 13, 7, 4, 2, 1, 1, 285, 225, 137, 78, 43, 24, 13, 7, 4, 2, 1, 1, 510
Offset: 1

Views

Author

Keywords

Comments

Rows are the columns in the table at the end of the Minc reference, read top to bottom. - Joerg Arndt, Jan 15 2024

Examples

			Triangle begins
    1,
    1,   1,
    2,   1,   1,
    3,   2,   1,  1,
    5,   4,   2,  1,  1,
    9,   7,   4,  2,  1,  1,
   16,  12,   7,  4,  2,  1,  1,
   28,  22,  13,  7,  4,  2,  1, 1,
   50,  39,  24, 13,  7,  4,  2, 1, 1,
   89,  70,  42, 24, 13,  7,  4, 2, 1, 1,
  159, 126,  76, 43, 24, 13,  7, 4, 2, 1, 1,
  285, 225, 137, 78, 43, 24, 13, 7, 4, 2, 1, 1,
  ...
Rows read backward approach A002843. - _Joerg Arndt_, Jan 15 2024
		

Crossrefs

See A047913 for another version.

Programs

  • Maple
    v := proc(c,d) option remember; local i; if d < 0 or c < 0 then 0 elif d = c then 1 else add(v(i,d-c),i=1..2*c); fi; end;
  • Mathematica
    v[c_, d_] := v[c, d] = If[d < 0 || c < 0, 0, If[d == c, 1, Sum[v[i, d - c], {i, 1, 2*c}]]]; Table[v[d, c], {c, 1, 13}, {d, 1, c}] // Flatten (* Jean-François Alcover, Dec 10 2012, after Maple *)

A001180 Erroneous version of A002572.

Original entry on oeis.org

1, 1, 2, 3, 3, 5, 9, 16, 28, 50, 89, 159, 285, 510, 914, 1639, 2938, 5269, 9451, 16952
Offset: 1

Views

Author

Keywords

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

A002846 Number of ways of transforming a set of n indistinguishable objects into n singletons via a sequence of n-1 refinements.

Original entry on oeis.org

1, 1, 1, 2, 4, 11, 33, 116, 435, 1832, 8167, 39700, 201785, 1099449, 6237505, 37406458, 232176847, 1513796040, 10162373172, 71158660160, 511957012509, 3819416719742, 29195604706757, 230713267586731, 1861978821637735, 15484368121967620, 131388840051760458
Offset: 1

Views

Author

N. J. A. Sloane. Entry revised by N. J. A. Sloane, Jun 11 2012

Keywords

Comments

Construct the ranked poset L(n) whose nodes are the A000041(n) partitions of n, with all the partitions into the same number of parts having the same rank. A partition into k parts is joined to a partition into k+1 parts if the latter is a refinement of the former.
The partition n^1 is at the left and the partition 1^n at the right. The illustration by Olivier Gérard shows the posets L(2) through L(8).
Then a(n) is the number of paths of length n-1 in L(n) that join n^1 to 1^n.
Stated another way, a(n) is the number of maximal chains in the ranked poset L(n). (This poset is not a lattice for n > 4.) - Comments corrected by Gus Wiseman, May 01 2016

Examples

			a(5) = 4 because there are 4 paths from top to bottom in this lattice:
  .
       ooooo
     /      \
  o.oooo   oo.ooo
    |    X    |
  o.o.ooo  o.oo.oo
     \       /
      o.o.o.oo
          |
      o.o.o.o.o
  .
(This is the ranked poset L(5), but drawn vertically rather than horizontally.)
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

See A213242, A213385, A213427 for related sequences, A327643.

Programs

  • Maple
    v:= l-> [seq(`if`(i=1 or l[i]>l[i-1], seq(subs(1=[][], sort(subsop(
             i=[j, l[i]-j][], l))), j=1..l[i]/2), [][]), i=1..nops(l))]:
    b:= proc(l) option remember; `if`(max(l)<2, 1, add(b(h), h=v(l))) end:
    a:= n-> b([n]):
    seq(a(n), n=1..30);  # Alois P. Heinz, Sep 22 2019
  • Mathematica
    <Mitch Harris, Jan 19 2006 *)
  • Sage
    def A002846(n): return Posets.IntegerPartitions(n).chain_polynomial().leading_coefficient()  # Max Alekseyev, Dec 23 2015

Extensions

a(17)-a(25) from Mitch Harris, Jan 19 2006

A104429 Number of ways to split {1, 2, 3, ..., 3n} into n arithmetic progressions each with 3 terms.

Original entry on oeis.org

1, 1, 2, 5, 15, 55, 232, 1161, 6643, 44566, 327064, 2709050, 24312028, 240833770, 2546215687, 29251369570, 355838858402, 4658866773664, 64127566159756, 940320691236206
Offset: 0

Views

Author

Jonas Wallgren, Mar 17 2005

Keywords

Examples

			{{{1,2,3},{4,5,6},{7,8,9}}, {{1,2,3},{4,6,8},{5,7,9}}, {{1,3,5},{2,4,6},{7,8,9}}, {{1,4,7},{2,5,8},{3,6,9}}, {{1,5,9},{2,3,4},{6,7,8}}} are the 5 ways to split 1, 2, 3, ..., 9 into 3 arithmetic progressions each with 3 elements. Thus a(3)=5.
		

References

  • R. K. Guy, Sedlacek's Conjecture on Disjoint Solutions of x+y= z, Univ. Calgary, Dept. Mathematics, Research Paper No. 129, 1971.
  • R. K. Guy, Sedlacek's Conjecture on Disjoint Solutions of x+y= z, in Proc. Conf. Number Theory. Pullman, WA, 1971, pp. 221-223.
  • R. K. Guy, Packing [1,n] with solutions of ax + by = cz; the unity of combinatorics, in Colloq. Internaz. Teorie Combinatorie. Rome, 1973, Atti Conv. Lincei. Vol. 17, Part II, pp. 173-179, 1976.

Crossrefs

All of A279197, A279198, A202705, A279199, A282615 are concerned with counting solutions to X+Y=2Z in various ways.
See also A002848, A002849, A334250.

Extensions

a(11)-a(14) from Alois P. Heinz, Dec 28 2011
a(15)-a(17) from Fausto A. C. Cariboni, Feb 22 2017
a(18)-a(19) from Martin Fuller, Jul 08 2025

A002843 Number of partitions of n into parts 1/2, 3/4, 7/8, 15/16, etc.

Original entry on oeis.org

1, 1, 2, 4, 7, 13, 24, 43, 78, 141, 253, 456, 820, 1472, 2645, 4749, 8523, 15299, 27456, 49267, 88407, 158630, 284622, 510683, 916271, 1643963, 2949570, 5292027, 9494758, 17035112, 30563634, 54835835, 98383803, 176515310, 316694823, 568197628, 1019430782
Offset: 0

Views

Author

Keywords

Comments

Row sums of A049286 and A047913. [Vladeta Jovovic, Dec 02 2009]
Also number of compositions (a_1,a_2,...) of n with each a_i <= 2*a_(i-1). [Vladeta Jovovic, Dec 02 2009]

Examples

			A straightforward partition problem: 1 = 1/2 + 1/2 and there is no other partition of 1, so a(1)=1.
a(3)=4 since 3 = 6(1/2) = 4(3/4) = 2(3/4) + 3(1/2) = 2(7/8) + 3/4 + 1/2.
a(4)=7 since 4 = 8(1/2) = 5(1/2) + 2(3/4) = 2(1/2) + 4(3/4) = 3(1/2) + 3/4 + 2(7/8) = 3(3/4) + 2(7/8) = 1/2 + 4(7/8) = 2(15/16) + 7/8 + 3/4 + 1/2.
From _Joerg Arndt_, Dec 28 2012: (Start)
There are a(6)=24 compositions of 6 where part(k) <= 2 * part(k-1):
[ 1]  [ 1 1 1 1 1 1 ]
[ 2]  [ 1 1 1 1 2 ]
[ 3]  [ 1 1 1 2 1 ]
[ 4]  [ 1 1 2 1 1 ]
[ 5]  [ 1 1 2 2 ]
[ 6]  [ 1 2 1 1 1 ]
[ 7]  [ 1 2 1 2 ]
[ 8]  [ 1 2 2 1 ]
[ 9]  [ 1 2 3 ]
[10]  [ 2 1 1 1 1 ]
[11]  [ 2 1 1 2 ]
[12]  [ 2 1 2 1 ]
[13]  [ 2 2 1 1 ]
[14]  [ 2 2 2 ]
[15]  [ 2 3 1 ]
[16]  [ 2 4 ]
[17]  [ 3 1 1 1 ]
[18]  [ 3 1 2 ]
[19]  [ 3 2 1 ]
[20]  [ 3 3 ]
[21]  [ 4 1 1 ]
[22]  [ 4 2 ]
[23]  [ 5 1 ]
[24]  [ 6 ]
(End)
		

References

  • Minc, H.; A problem in partitions: Enumeration of elements of a given degree in the free commutative entropic cyclic groupoid. Proc. Edinburgh Math. Soc. (2) 11 1958/1959 223-224.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1,
          add(b(n-j, min(n-j, 2*j)), j=1..i))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..40);  # Alois P. Heinz, Jun 24 2017
  • Mathematica
    v[c_, d_] := v[c, d] = If[d < 0 || c < 0, 0, If[d == c, 1, Sum[v[i, d - c], {i, 1, 2*c}]]]; Join[{1}, Plus @@@ Table[v[d, c], {c, 1, 34}, {d, 1, c}]] (* Jean-François Alcover, Dec 10 2012, after Vladeta Jovovic *)

Formula

The g.f. (z**2+z+1)*(z-1)**2/(1-2*z-z**3+3*z**4) conjectured by Simon Plouffe in his 1992 dissertation is wrong.

Extensions

More terms from John W. Layman, Nov 24 2001
Examples and offset corrected by Larry Reeves (larryr(AT)acm.org), Jan 06 2005
Further terms from Vladeta Jovovic, Mar 13 2006

A002845 Number of distinct values taken by 2^2^...^2 (with n 2's and parentheses inserted in all possible ways).

Original entry on oeis.org

1, 1, 1, 2, 4, 8, 17, 36, 78, 171, 379, 851, 1928, 4396, 10087, 23273, 53948, 125608, 293543, 688366, 1619087, 3818818, 9029719, 21400706, 50828664, 120963298, 288405081, 688821573, 1647853491, 3948189131, 9473431479
Offset: 1

Views

Author

Keywords

Comments

a(n) <= A002955(n). - Max Alekseyev, Sep 23 2009

Examples

			From _M. F. Hasler_, Apr 17 2024: (Start)
The table with explicit lists of values starts as follows:
   n | distinct values of 2^...^2 with all possible parenthesizations
-----+---------------------------------------------------------------
   1 | 2
   2 | 2^2 = 4
   3 | (2^2)^2 = 2^(2^2) = 16
   4 | (2^2^2)^2 = 2^8 = 256, (2^2)^(2^2) = 2^(2^2^2) = 2^16 (= 65536)
   5 | 256^2 = 2^16, (2^16)^2 = 2^32, 2^256, 2^2^16 (~ 2*10^19728)
   6 | (2^16)^2 = 2^32, 2^64, 2^512, 2^2^16, 2^2^17, 2^2^32, 2^2^256, 2^2^2^16
   7 | 2^64, 2^128, 2^256, 2^1024, 2^2^17, 2^2^18, 2^2^32, 2^2^33, 2^2^64, 2^2^257,
     | 2^2^512, 2^2^2^16, 2^2^65537, 2^2^2^17, 2^2^2^32, 2^2^2^256, 2^2^2^2^16
  ...| ...
(When parentheses are omitted above, we use that ^ is right associative.) (End)
		

References

  • J. Q. Longyear, personal communication.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • PARI
    /* Define operators for numbers represented (recursively) as list of positions of bits 1. Illustration using the commands below: T = 3.bits; T.int */
    n.bits = vector(hammingweight(n), v,  n -= 1 << v= valuation(n, 2); v.bits)
    ONE = 1.bits; m.int = sum(i=1, #m, 1<=0])}
    {ADD(m, n, a=#m, b=#n)= if(!a, n, !b, m, a=b=1; until(a>#m|| b>#n, if(m[a]==n[b], until(a>=#m|| m[a]!=m[a+1]|| !#m=m[^a], m[a]=ADD(m[a],ONE)); b++, CMP(m[a], n[b])<0, a++, m=concat([m[1..a-1], [n[b]], m[a..#m]]); b++)); b>#n|| m=concat(m,n[b..#n]); m)}
    {CMP(m, n, a=#m, b=#n, c=0)= if(!b, a, !a, -1, while(!(c=CMP(m[a], n[b]))&& a--&& b--, ); if(c, c, 1-b))}
    {SUB(m, n, a=#n)= if(!a, m, my(b=a=1, c, i); while(a<=#m && b<=#n, if(0>c=CMP(m[a], n[b]), a++, c, i=[c=n[b]]; b++; while(m[a]!=c=ADD(c, ONE), if(b<=#n && c==n[b], b++, i=concat(i, [c]))); m=concat([m[1..a-1], i, m[a+1..#m]]); a += #i, m=m[^a]; b++)); m)}
    A2845 = List([[2.bits]]) /* List of values for each n */
    {A002845(n)= while(#A2845= 15. - M. F. Hasler, Apr 28 2024

Extensions

a(12)-a(13) corrected and a(14)-a(27) added by Jon E. Schoenfield, Oct 11 2008
a(28)-a(29) computed by Kirill Osenkov, added by Vladimir Reshetnikov, Feb 07 2019
a(30)-a(31) added by Sean A. Irvine, Feb 18 2019

A213385 a(n) = number of refinements of the partition n^1.

Original entry on oeis.org

1, 2, 3, 7, 15, 43, 131, 468, 1776, 7559, 34022, 166749, 853823, 4682358, 26720781, 161074458, 1004485751, 6576974188, 44322716809, 311440019349, 2247888977510, 16819336465164, 128915407382036, 1021269823516449, 8261243728564640, 68848043979970646
Offset: 1

Views

Author

N. J. A. Sloane, Jun 10 2012

Keywords

Comments

Consider the ranked poset L(n) of partitions defined in A002846. Then a(n) is the total number of paths of all lengths 0,1,...,n-1 that start at n^1 and end at a node in the poset.

Examples

			Referring to the ranked poset L(5) shown in the example in A002846, there are 15 paths that start at ooooo:
end point / number of paths
ooooo / 1
o oooo / 1
oo ooo / 1
o o ooo / 2
o oo oo / 2
o o o oo / 4
o o o o o / 4
Total a(5) = 15.
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

Crossrefs

Programs

  • Maple
    b:= proc(l) option remember; local n, i, j, t; n:=nops(l);
          `if`(l[n]=1 and {l[1..n-1][]} minus {0}={}, 1,
          add(`if`(l[i]=0, 0, add(`if`(l[j]=0 or i=j and l[j]<2, 0,
          b([seq(`if`(t>n, 0, l[t])-`if`(t=i and t=j, 2, `if`(t=i or t=j,
          1, `if`(t=i+j, -1, 0))), t=1..max(n, i+j))])), j=i..n)), i=1..n))
        end:
    g:= proc(n, i, l)
          `if`(n=0 and i=0, b(l), `if`(i=1, b([n, l[]]), add(g(n-i*j, i-1,
          `if`(l=[] and j=0, l, [j, l[]])), j=0..n/i)))
        end:
    a:= n-> g(n, n, []):
    seq(a(n), n=1..25);  # Alois P. Heinz, Jun 11 2012
  • Mathematica
    b[l_List] := b[l] = Module[{n, i, j, t}, n = Length[l]; If[l[[n]] == 1 && Union[ l[[1 ;; n-1]]] ~Complement~ {0} == {}, 1, Sum[If[l[[i]] == 0, 0,  Sum[If[l[[j]] == 0 || i == j && l[[j]]<2, 0, b[Table[If[t>n, 0, l[[t]]] - Which[t == i && t == j, 2, t == i || t == j, 1, t == i+j, -1, True, 0], {t, 1, Max[n, i+j]}]]], {j, i, n}] ], {i, 1, n}]]]; g[n_, i_, l_List] := If[n == 0 && i == 0, b[l], If[i == 1, b[ Join[{n}, l]], Sum[g[n-i*j, i-1, If[l == {} && j == 0, l, Join[{j}, l]]], {j, 0, n/i}]]]; a[n_] := g[n, n, {}]; Table[a[n], {n, 1, 25}] (* Jean-François Alcover, Feb 26 2015, after Alois P. Heinz *)

Extensions

Definition clarified by David Applegate, Jun 10 2012
More terms from Alois P. Heinz, Jun 11 2012
Edited by Alois P. Heinz at the suggestion of Gus Wiseman, May 02 2016

A007178 Number of ways to write 1 as ordered sum of n powers of 1/2, allowing repeats.

Original entry on oeis.org

1, 1, 3, 13, 75, 525, 4347, 41245, 441675, 5259885, 68958747, 986533053, 15292855019, 255321427725, 4567457001915, 87156877087069, 1767115200924299, 37936303950503853, 859663073472084315, 20505904049009202685, 513593410566661282347, 13476082013068430626893
Offset: 1

Views

Author

Keywords

Comments

Also the dimension of the arity n component of the operad of level algebras (see the reference by Chataur-Livernet by definition), and the cardinality of the subset of the free commutative medial magma with n generators that contains each generator exactly once. The linear operad of level algebras is the linearization of the set operad of commutative medial magmas; the statement about commutative medial magmas follows from the description in the paper of Ježek-Kepka. - Vladimir Dotsenko, Mar 12 2022

Examples

			For n=3, the 3 sums are 1/2 + 1/4 + 1/4, 1/4 + 1/2 + 1/4, and 1/4 + 1/4 + 1/2.
		

References

  • D. E. Knuth, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    b:= proc(n, r, p) option remember; `if`(n b(n, 1, 0):
    seq(a(n), n=1..23);  # Alois P. Heinz, Nov 07 2017
  • Mathematica
    f[n_] := Coefficient[Expand[Sum[z^(2^j), {j, n}]^n], z, 2^n]; Array[f, 20] (* Robert G. Wilson v, Apr 08 2012 *)
  • PARI
    f(n)={my(M);if(n>1,M=matrix(n,n);M[2,1] = 1;for(k=3,n,for(l=1,k-2,M[k,l] = 0;smx = min(2*l,k-l-1);for(s=1,smx, M[k,l] += binomial(k+l-1,2*l-s)*M[k-l,s]));M[k,k-1] = 1);M[n,1],1)}

Formula

a(n) = coefficient of z^(2^n) in (z+z^2+z^4+...+z^(2^n))^n. - Don Knuth.
From Giuseppe Molteni, Dec 14 2012: (Start)
Limit_{n->oo} (a(n)/n!)^(1/n) = 1.192674341213466032221288982528755... (see References: "Representation of a 2-power as sum of k 2-powers: the asymptotic behavior").
a(n) == 4 + (-1)^n (mod 8) for n > 2 (see References: "Representation of a 2-power as sum of k 2-powers: a recursive formula"). (End)
More precise asymptotics: a(n) ~ c * d^n * n!, where d = 1.192674341213466032221288982528755176734489232027131552652821007498903522051783..., c = 0.24849369086953813603231092781945750388624874631949260927875431616785914609... - Vaclav Kotesovec, Sep 20 2019
a(n) = A323840(n,n). - Alois P. Heinz, Mar 31 2021

Extensions

More terms from Hugo van der Sanden
Minor edits from Vaclav Kotesovec, Jul 26 2014

A294775 Number A(n,k) of partitions of 1 into exactly k*n+1 powers of 1/(k+1); square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 2, 4, 5, 1, 1, 1, 1, 2, 4, 7, 9, 1, 1, 1, 1, 2, 4, 8, 13, 16, 1, 1, 1, 1, 2, 4, 8, 15, 25, 28, 1, 1, 1, 1, 2, 4, 8, 16, 29, 48, 50, 1, 1, 1, 1, 2, 4, 8, 16, 31, 57, 92, 89, 1, 1, 1, 1, 2, 4, 8, 16, 32, 61, 112, 176, 159, 1
Offset: 0

Views

Author

Alois P. Heinz, Nov 08 2017

Keywords

Examples

			A(4,1) = 3: [1/4,1/4,1/4,1/8,1/8], [1/2,1/8,1/8,1/8,1/8], [1/2,1/4,1/8,1/16,1/16].
A(5,2) = 7: [1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/9,1/27,1/27,1/27], [1/3,1/9,1/9,1/9,1/9,1/27,1/27,1/27,1/27,1/27,1/27], [1/3,1/9,1/9,1/9,1/9,1/9,1/27,1/27,1/81,1/81,1/81], [1/3,1/3,1/27,1/27,1/27,1/27,1/27,1/27,1/27,1/27,1/27], [1/3,1/3,1/9,1/27,1/27,1/27,1/27,1/27,1/81,1/81,1/81], [1/3,1/3,1/9,1/9,1/27,1/81,1/81,1/81,1/81,1/81,1/81], [1/3,1/3,1/9,1/9,1/27,1/27,1/81,1/81,1/243,1/243,1/243].
Square array A(n,k) begins:
  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,  2,  2,  2,  2,  2,  2,  2,  2, ...
  1,  3,  4,  4,  4,  4,  4,  4,  4, ...
  1,  5,  7,  8,  8,  8,  8,  8,  8, ...
  1,  9, 13, 15, 16, 16, 16, 16, 16, ...
  1, 16, 25, 29, 31, 32, 32, 32, 32, ...
  1, 28, 48, 57, 61, 63, 64, 64, 64, ...
		

Crossrefs

Columns k=0-10 give (offsets may differ): A000012, A002572, A176485, A176503, A194628, A194629, A194630, A194631, A194632, A194633, A295081.
Main diagonal gives A011782(n-1) for n>0.
Cf. A294746.

Programs

  • Maple
    b:= proc(n, r, k) option remember;
          `if`(n `if`(k=0, 1, b(k*n+1, 1, k+1)):
    seq(seq(A(n, d-n), n=0..d), d=0..14);
  • Mathematica
    b[n_, r_, k_] := b[n, r, k] = If[n < r, 0, If[r == 0, If[n == 0, 1, 0], Sum[b[n - j, k*(r - j), k], {j, 0, Min[n, r]}]]];
    A[n_, k_] := If[k == 0, 1, b[k*n + 1, 1, k + 1]];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Nov 11 2017, after Alois P. Heinz *)

A002849 Number of maximal collections of pairwise disjoint subsets {X,Y,Z} of {1, 2, ..., n}, each satisfying X + Y = Z.

Original entry on oeis.org

1, 1, 1, 2, 4, 6, 3, 10, 25, 12, 42, 8, 40, 204, 21, 135, 1002, 4228, 720, 5134, 29546, 4079, 35533, 3040, 28777, 281504, 20505, 212283, 2352469, 16907265, 1669221, 19424213, 167977344, 14708525, 191825926, 10567748, 149151774, 2102286756, 103372655, 1534969405
Offset: 1

Views

Author

Keywords

Examples

			For n = 3, the unique solution is 1 + 2 = 3.
For n = 12, there are 8 solutions:
  1  5  6 | 1  5  6 | 2  5  7 | 1  6  7
  2  8 10 | 3  7 10 | 3  6  9 | 4  5  9
  4  7 11 | 2  9 11 | 1 10 11 | 3  8 11
  3  9 12 | 4  8 12 | 4  8 12 | 2 10 12
  --------+---------+---------+--------
  2  4  6 | 2  6  8 | 3  4  7 | 3  5  8
  1  9 10 | 4  5  9 | 1  8  9 | 2  7  9
  3  8 11 | 3  7 10 | 5  6 11 | 4  6 10
  5  7 12 | 1 11 12 | 2 10 12 | 1 11 12
		

References

  • R. K. Guy, "Sedlacek's Conjecture on Disjoint Solutions of x+y= z," in Proc. Conf. Number Theory. Pullman, WA, 1971, pp. 221-223.
  • R. K. Guy, "Packing [1,n] with solutions of ax + by = cz; the unity of combinatorics," in Colloq. Internaz. Teorie Combinatorie. Rome, 1973, Atti Conv. Lincei. Vol. 17, Part II, pp. 173-179, 1976.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • PARI
    nxyz(v,t)=local(n,r,x2); r=0; if(t==0,return(1)); for(i3=3*t,#v, n=v[i3]; for(i1=1,i3-2, x2=n-v[i1]; if(x2<=v[i1],break); for(i2=i1+1,i3-1, if(v[i2]>=x2, if(v[i2]==x2, r+=nxyz(vector(i3-3,k,v[if(kFranklin T. Adams-Watters

Extensions

Edited by N. J. A. Sloane, Feb 10 2010, based on posting to the Sequence Fans Mailing List by Franklin T. Adams-Watters, R. K. Guy, R. H. Hardin, Alois P. Heinz, Andrew Weimholt, Max Alekseyev and others
a(32)-a(39) from Max Alekseyev, Feb 23 2012
Definition corrected by Max Alekseyev, Nov 16 2012, Jul 06 2023
a(40)-a(41) from Fausto A. C. Cariboni, Feb 04 2017
a(42) from Fausto A. C. Cariboni, Mar 12 2017
Showing 1-10 of 39 results. Next