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

A232466 Number of dependent sets with largest element n.

Original entry on oeis.org

0, 0, 1, 2, 4, 10, 20, 44, 93, 198, 414, 864, 1788, 3687, 7541, 15382, 31200, 63191, 127482, 256857, 516404, 1037104, 2080357, 4170283, 8354078, 16728270, 33485553, 67012082, 134083661, 268249350, 536617010, 1073391040, 2147014212, 4294321453, 8589084469, 17178702571, 34358228044, 68717407217, 137436320023, 274874294012, 549751307200, 1099505394507, 2199015662477, 4398035921221, 8796080392378, 17592168222674
Offset: 1

Views

Author

David S. Newman, Nov 24 2013

Keywords

Comments

Let S be a set of positive integers. If S can be divided into two subsets which have equal sums, then S is said to be a dependent set.
Dependent sets are also called biquanimous sets. Biquanimous partitions are counted by A002219 and ranked by A357976. - Gus Wiseman, Apr 18 2024

Examples

			From _Gus Wiseman_, Apr 18 2024: (Start)
The a(1) = 0 through a(6) = 10 sets:
  .  .  {1,2,3}  {1,3,4}    {1,4,5}    {1,5,6}
                 {1,2,3,4}  {2,3,5}    {2,4,6}
                            {1,2,4,5}  {1,2,3,6}
                            {2,3,4,5}  {1,2,5,6}
                                       {1,3,4,6}
                                       {2,3,5,6}
                                       {3,4,5,6}
                                       {1,2,3,4,6}
                                       {1,2,4,5,6}
                                       {2,3,4,5,6}
(End)
		

References

  • J. Bourgain, Λ_p-sets in analysis: results, problems and related aspects. Handbook of the geometry of Banach spaces, Vol. I,195-232, North-Holland, Amsterdam, 2001.

Crossrefs

Column k=2 of A248112.
First differences of A371791.
The complement is counted by A371793, differences of A371792.
This is the "bi-" case of A371797, differences of A371796.
A002219 (aerated) counts biquanimous partitions, ranks A357976.
A006827 and A371795 count non-biquanimous partitions, ranks A371731.
A237258 (aerated) counts biquanimous strict partitions, ranks A357854.
A321142 and A371794 count non-biquanimous strict partitions.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(i<1, `if`(n=0, {0}, {}),
          `if`(i*(i+1)/2 p+x^i,
           b(n+i, i-1) union b(abs(n-i), i-1))))
        end:
    a:= n-> nops(b(n, n-1)):
    seq(a(n), n=1..15);  # Alois P. Heinz, Nov 24 2013
  • Mathematica
    b[n_, i_] := b[n, i] = If[i<1, If[n == 0, {0}, {}], If[i*(i+1)/2 < n, {}, b[n, i-1] ~Union~ Map[Function[p, p+x^i], b[n+i, i-1] ~Union~ b[Abs[n-i], i-1]]]]; a[n_] := Length[b[n, n-1]]; Table[Print[a[n]]; a[n], {n, 1, 24}] (* Jean-François Alcover, Mar 04 2014, after Alois P. Heinz *)
    biqQ[y_]:=MemberQ[Total/@Subsets[y],Total[y]/2];
    Table[Length[Select[Subsets[Range[n]], MemberQ[#,n]&&biqQ[#]&]],{n,10}] (* Gus Wiseman, Apr 18 2024 *)
  • PARI
    dep(S,k=0)=if(#S<2,return(if(#S,S[1],0)==k)); my(T=S[1..#S-1]);dep(T,abs(k-S[#S]))||dep(T,k+S[#S])
    a(n)=my(S=[1..n-1]);sum(i=1,2^(n-1)-1,dep(vecextract(S,i),n)) \\ Charles R Greathouse IV, Nov 25 2013
    
  • PARI
    a(n)=my(r=0);forsubset(n-1,s,my(t=sum(i=1,#s,s[i])+n);if(t%2==0,my(b=1);for(i=1,#s,b=bitor(b,b<Martin Fuller, Mar 21 2025

Formula

a(n) < 2^(n-2) because there are 2^(n-1) sets of which half have an even sum. - Martin Fuller, Mar 21 2025

Extensions

a(9)-a(24) from Alois P. Heinz, Nov 24 2013
a(25) from Alois P. Heinz, Sep 30 2014
a(26) from Alois P. Heinz, Sep 17 2022
a(27) onwards from Martin Fuller, Mar 21 2025

A058377 Number of solutions to 1 +- 2 +- 3 +- ... +- n = 0.

Original entry on oeis.org

0, 0, 1, 1, 0, 0, 4, 7, 0, 0, 35, 62, 0, 0, 361, 657, 0, 0, 4110, 7636, 0, 0, 49910, 93846, 0, 0, 632602, 1199892, 0, 0, 8273610, 15796439, 0, 0, 110826888, 212681976, 0, 0, 1512776590, 2915017360, 0, 0, 20965992017, 40536016030, 0, 0, 294245741167
Offset: 1

Views

Author

Naohiro Nomoto, Dec 19 2000

Keywords

Comments

Consider the set { 1,2,3,...,n }. Sequence gives number of ways this set can be partitioned into 2 subsets with equal sums. For example, when n = 7, { 1,2,3,4,5,6,7} can be partitioned in 4 ways: {1,6,7} {2,3,4,5}; {2,5,7} {1,3,4,6}; {3,4,7} {1,2,5,6} and {1,2,4,7} {3,5,6}. - sorin (yamba_ro(AT)yahoo.com), Mar 24 2007
The "equal sums" of Sorin's comment are the positive terms of A074378 (Even triangular numbers halved). In the current sequence a(n) <> 0 iff n is the positive index (A014601) of an even triangular number (A014494). - Rick L. Shepherd, Feb 09 2010
a(n) is the number of partitions of n(n-3)/4 into distinct parts not exceeding n-1. - Alon Amit, Oct 18 2017
a(n) is the coefficient of x^(n*(n+1)/4-1) of Product_{k=2..n} (1+x^k). - Jianing Song, Nov 19 2021

Examples

			1+2-3=0, so a(3)=1;
1-2-3+4=0, so a(4)=1;
1+2-3+4-5-6+7=0, 1+2-3-4+5+6-7=0, 1-2+3+4-5+6-7=0, 1-2-3-4-5+6+7=0, so a(7)=4.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; local m; m:= i*(i+1)/2;
          `if`(n>m, 0, `if`(n=m, 1, b(abs(n-i), i-1) +b(n+i, i-1)))
        end:
    a:= n-> `if`(irem(n-1, 4)<2, 0, b(n, n-1)):
    seq(a(n), n=1..60);  # Alois P. Heinz, Oct 30 2011
  • Mathematica
    f[n_, s_] := f[n, s] = Which[n == 0, If[s == 0, 1, 0], Abs[s] > (n*(n + 1))/2, 0, True, f[n - 1, s - n] + f[n - 1, s + n]]; Table[ f[n, 0]/2, {n, 1, 50}]
  • PARI
    list(n) = my(poly=vector(n), v=vector(n)); poly[1]=1; for(k=2, n, poly[k]=poly[k-1]*(1+'x^k)); for(k=1, n, if(k%4==1||k%4==2, v[k]=0, v[k]=polcoeff(poly[k], k*(k+1)/4-1))); v \\ Jianing Song, Nov 19 2021

Formula

a(n) is half the coefficient of q^0 in product('(q^(-k)+q^k)', 'k'=1..n) for n >= 1. - Floor van Lamoen, Oct 10 2005
a(4n+1) = a(4n+2) = 0. - Michael Somos, Apr 15 2007
a(n) = [x^n] Product_{k=1..n-1} (x^k + 1/x^k). - Ilya Gutkovskiy, Feb 01 2024

Extensions

More terms from Sascha Kurz, Mar 25 2002
Edited and extended by Robert G. Wilson v, Oct 24 2002

A164934 Number of different ways to select 3 disjoint subsets from {1..n} with equal element sum.

Original entry on oeis.org

0, 0, 0, 0, 1, 3, 8, 22, 63, 157, 502, 1562, 4688, 15533, 50953, 165054, 562376, 1911007, 6467143, 22447463, 78021923, 271410289, 957082911, 3384587525, 11998851674, 42876440587, 153684701645, 552421854011, 1995875594696, 7231871165277, 26274832876337
Offset: 1

Views

Author

Alois P. Heinz, Aug 31 2009

Keywords

Comments

a(5) = 1, because {1,4}, {2,3}, {5} are disjoint subsets of {1..5} with element sum 5.
a(6) = 3: {1,4}, {2,3}, {5} have element sum 5, {1,5}, {2,4}, {6} have element sum 6, and {1,6}, {2,5}, {3,4} have element sum 7.

Crossrefs

Column k=3 of A196231.

Programs

  • Maple
    b:= proc(n, k, i) option remember; local m;
          m:= i*(i+1)/2;
          if k>n then b(k, n, i)
        elif k>=0 and n+k>m or k<0 and n-2*k>m then 0
        elif [n, k, i] = [0, 0, 0] then 1
        else b(n, k, i-1)+b(n+i, k+i, i-1)+b(n-i, k, i-1)+b(n, k-i, i-1)
          fi
        end:
    a:= proc(n) option remember;
          `if`(n>2, b(n, n, n-1)/2+ a(n-1), 0)
        end:
    seq(a(n), n=1..20);
  • Mathematica
    b[n_, k_, i_] := b[n, k, i] = Module[{m = i*(i+1)/2}, Which[k>n , b[k, n, i], k >= 0 && n+k>m || k<0 && n-2*k > m, 0, {n, k, i} == {0, 0, 0}, 1, True, b[n, k, i-1] + b[n+i, k+i, i-1] + b[n-i, k, i-1] + b[n, k-i, i-1]]]; a[n_] := a[n] = If[n>2, b[n, n, n-1]/2 + a[n-1], 0]; Table[a[n], {n, 1, 20}] (* Jean-François Alcover, Feb 05 2015, after Alois P. Heinz *)

Formula

Conjecture: a(n) ~ 4^n / (Pi * sqrt(3) * n^3). - Vaclav Kotesovec, Oct 16 2014

A196231 Irregular triangle T(n,k), n>=1, 1<=k<=ceiling(n/2), read by rows: T(n,k) is the number of different ways to select k disjoint (nonempty) subsets from {1..n} with equal element sum.

Original entry on oeis.org

1, 3, 7, 1, 15, 3, 31, 7, 1, 63, 17, 3, 127, 43, 8, 1, 255, 108, 22, 3, 511, 273, 63, 9, 1, 1023, 708, 157, 23, 3, 2047, 1867, 502, 67, 10, 1, 4095, 4955, 1562, 203, 26, 3, 8191, 13256, 4688, 693, 83, 11, 1, 16383, 35790, 15533, 2584, 322, 30, 3, 32767, 97340
Offset: 1

Views

Author

Alois P. Heinz, Sep 29 2011

Keywords

Examples

			T(8,4) = 3: {1,6}, {2,5}, {3,4}, {7} have element sum 7, {1,7}, {2,6}, {3,5}, {8} have element sum 8, and {1,8}, {2,7}, {3,6}, {4,5} have element sum 9.
Triangle begins:
.   1;
.   3;
.   7,   1;
.  15,   3;
.  31,   7,  1;
.  63,  17,  3;
. 127,  43,  8, 1;
. 255, 108, 22, 3;
		

Crossrefs

Columns k=1-10 give: A000225, A161943, A164934, A164949, A196232, A196233, A196234, A196235, A196236, A196237. Row sums give A196534. Row lengths are in A110654.

Programs

  • Maple
    b:= proc(l, n, k) option remember; local i, j; `if`(l=[0$k], 1, `if`(add(j, j=l)>n*(n-1)/2, 0, b(l, n-1, k))+ add(`if`(l[j] -n<0, 0, b(sort([seq(l[i] -`if`(i=j, n, 0), i=1..k)]), n-1, k)), j=1..k)) end: T:= (n, k)-> add(b([t$k], n, k), t=2*k-1..floor(n*(n+1)/(2*k)))/k!:
    seq(seq(T(n, k), k=1..ceil(n/2)), n=1..15);
  • Mathematica
    b[l_List, n_, k_] := b[l, n, k] = Module[{i, j}, If[l == Array[0&, k], 1, If [Total[l] > n*(n-1)/2, 0, b[l, n-1, k]] + Sum [If [l[[j]] - n < 0, 0, b[Sort[Table[l[[i]] - If[i == j, n, 0], {i, 1, k}]], n-1, k]], {j, 1, k}]] ]; T[n_, k_] := Sum[b[Array[t&, k], n, k], {t, 2*k-1, Floor[n*(n+1)/(2*k)]}]/k!; Table[Table[T[n, k], {k, 1, Ceiling[n/2]}], {n, 1, 15}] // Flatten (* Jean-François Alcover, Dec 17 2013, translated from Maple *)

A164949 Number of different ways to select 4 disjoint subsets from {1..n} with equal element sum.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 3, 9, 23, 67, 203, 693, 2584, 9929, 37480, 137067, 522854, 2052657, 8199728, 33456333, 137831268, 574295984, 2392149818, 9950364020, 41860671346, 177512155194, 757447761138, 3254519322231, 14049972380612, 60960849334377, 265354255338637
Offset: 1

Views

Author

Alois P. Heinz, Sep 01 2009

Keywords

Examples

			a(7) = 1, because {1,6}, {2,5}, {3,4}, {7} are disjoint subsets of {1..7} with element sum 7.
a(8) = 3: {1,6}, {2,5}, {3,4}, {7} have element sum 7, {1,7}, {2,6}, {3,5}, {8} have element sum 8, and {1,8}, {2,7}, {3,6}, {4,5} have element sum 9.
		

Crossrefs

Column k=4 of A196231.

Programs

  • Maple
    b:= proc() option remember; local i, j; `if`(args[1]=0 and args[2]=0 and args[3]=0 and args[4]=0, 1, `if`(add(args[j], j=1..4)> args[5] *(args[5]-1)/2, 0, b(args[j]$j=1..4, args[5]-1)) +add(`if`(args[j] -args[5]<0, 0, b(sort([seq(args[i] -`if`(i=j, args[5], 0), i=1..4)])[], args[5]-1)), j=1..4)) end: a:= n-> add(b(k$4, n), k=7..floor(n*(n+1)/8)) /24: seq(a(n), n=1..20);
  • Mathematica
    b[l_, n_, k_] := b[l, n, k] = Module[{i, j}, If[l == Array[0&, k], 1, If[ Total[l] > n(n-1)/2, 0, b[l, n-1, k]] + Sum[If[l[[j]]-n < 0, 0, b[Sort[ Table[l[[i]] - If[i==j, n, 0], {i, 1, k}]], n-1, k]], {j, 1, k}]]];
    T[n_, k_] := Sum[b[Array[t&, k], n, k], {t, 2k-1, Floor[n(n+1)/(2k)]}]/k!;
    a[n_] := T[n, 4];
    Array[a, 20] (* Jean-François Alcover, Jun 08 2018, after Alois P. Heinz's Maple code in A196231 *)

A196232 Number of different ways to select 5 disjoint subsets from {1..n} with equal element sum.

Original entry on oeis.org

1, 3, 10, 26, 83, 322, 1182, 3971, 15662, 69371, 328016, 1460297, 6080910, 26901643, 123926071, 598722099, 2838432721, 13220493552, 63710261040, 312134646974, 1554373859464, 7673048166979, 37597940705361, 186986406578372
Offset: 9

Views

Author

Alois P. Heinz, Sep 29 2011

Keywords

Examples

			a(10) = 3: {1,8}, {2,7}, {3,6}, {4,5}, {9} have element sum 9; {1,9}, {2,8}, {3,7}, {4,6}, {10} have element sum 10; {1,10}, {2,9}, {3,8}, {4,7}, {5,6} have element sum 11.
		

Crossrefs

Programs

  • Mathematica
    b[l_, n_, k_] := b[l, n, k] = Module[{i, j}, If[l == Array[0 &, k], 1, If[Total[l] > n*(n - 1)/2, 0, b[l, n - 1, k]] + Sum[If[l[[j]] - n < 0, 0, b[Sort[Table[l[[i]] - If[i == j, n, 0], {i, 1, k}]], n-1, k]], {j, 1, k}] ]];
    T[n_, k_] := Sum[b[Array[t &, k], n, k], {t, 2*k - 1, Floor[n*(n + 1)/(2*k) ]}]/k!;
    a[n_] := T[n, 5];
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 9, 25}] (* Jean-François Alcover, Jun 08 2018, after Alois P. Heinz *)

Extensions

a(26)-a(28) from Alois P. Heinz, Sep 25 2014
a(29)-a(32) from Bert Dobbelaere, Sep 05 2019

A196233 Number of different ways to select 6 disjoint subsets from {1..n} with equal element sum.

Original entry on oeis.org

1, 3, 11, 30, 113, 330, 1284, 5342, 23976, 141836, 604359, 2977297, 15970382, 80990028, 384959038, 1943894348, 10652582085, 53759893907, 292581087499, 1608101020113, 8896321349456, 51394417812545
Offset: 11

Views

Author

Alois P. Heinz, Sep 29 2011

Keywords

Examples

			a(12) = 3: {1,10}, {2,9}, {3,8}, {4,7}, {5,6}, {11} have element sum 11; {1,11}, {2,10}, {3,9}, {4,8}, {5,7}, {12} have element sum 12; {1,12}, {2,11}, {3,10}, {4,9}, {5,8}, {6,7} have element sum 13.
		

Crossrefs

Programs

  • Mathematica
    b[l_, n_, k_] := b[l, n, k] = Module[{i, j}, If[l == Array[0&, k], 1, If[Total[l] > n*(n - 1)/2, 0, b[l, n - 1, k]] + Sum[If[l[[j]] - n < 0, 0, b[Sort[Table[l[[i]] - If[i == j, n, 0], {i, 1, k}]], n-1, k]], {j, 1, k}] ]];
    T[n_, k_] := Sum[b[Array[t&, k], n, k], {t, 2*k - 1, Floor[n*(n + 1)/(2*k) ]}]/k!;
    a[n_] := T[n, 6];
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 11, 25}] (* Jean-François Alcover, Jun 08 2018, after Alois P. Heinz *)

Extensions

a(26) from Alois P. Heinz, Sep 25 2014
a(27)-a(32) from Bert Dobbelaere, Sep 05 2019

A196234 Number of different ways to select 7 disjoint subsets from {1..n} with equal element sum.

Original entry on oeis.org

1, 3, 12, 33, 114, 403, 1618, 8946, 45917, 189428, 979841, 5497818, 31708309, 178006222, 1091681487, 6207647636, 32636979255, 184162388392, 1069147827024, 6446977283374
Offset: 13

Views

Author

Alois P. Heinz, Sep 29 2011

Keywords

Examples

			a(14) = 3:
{1,12}, {2,11}, {3,10}, {4,9}, {5,8}, {6,7}, {13} have element sum 13; {1,13}, {2,12}, {3,11}, {4,10}, {5,9}, {6,8}, {14} have element sum 14; {1,14}, {2,13}, {3,12}, {4,11}, {5,10}, {6,9}, {7,8} have element sum 15.
		

Crossrefs

Programs

  • Mathematica
    b[l_, n_, k_] := b[l, n, k] = Module[{i, j}, If[l == Array[0 &, k], 1, If[Total[l] > n*(n - 1)/2, 0, b[l, n - 1, k]] + Sum[If[l[[j]] - n < 0, 0, b[Sort[Table[l[[i]] - If[i == j, n, 0], {i, 1, k}]], n-1, k]], {j, 1, k} ]]];
    T[n_, k_] := Sum[b[Array[t&, k], n, k], {t, 2*k - 1, Floor[n*(n+1)/(2*k) ]}]/k!;
    a[n_] := T[n, 7];
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 13, 25}] (* Jean-François Alcover, Jun 08 2018, after Alois P. Heinz *)

Extensions

a(26)-a(28) from Alois P. Heinz, Sep 26 2014
a(29)-a(32) from Bert Dobbelaere, Sep 02 2019

A196235 Number of different ways to select 8 disjoint subsets from {1..n} with equal element sum.

Original entry on oeis.org

1, 3, 13, 37, 134, 466, 1916, 9409, 46006, 255714, 1525052, 9524779, 58944302, 355219704, 2315784192, 14568780212, 97993669291, 619342933593
Offset: 15

Views

Author

Alois P. Heinz, Sep 29 2011

Keywords

Examples

			a(16) = 3: {1,14}, {2,13}, {3,12}, {4,11}, {5,10}, {6,9}, {7,8}, {15} have element sum 15; {1,15}, {2,14}, {3,13}, {4,12}, {5,11}, {6,10}, {7,9}, {16} have element sum 16; {1,16}, {2,15}, {3,14}, {4,13}, {5,12}, {6,11}, {7,10}, {8,9} have element sum 17.
		

Crossrefs

Programs

  • Mathematica
    b[l_, n_, k_] := b[l, n, k] = Module[{i, j}, If[l == Array[0 &, k], 1, If[Total[l] > n*(n - 1)/2, 0, b[l, n - 1, k]] + Sum[If[l[[j]] - n < 0, 0, b[Sort[Table[l[[i]] - If[i == j, n, 0], {i, 1, k}]], n - 1, k]], {j, 1, k}]]];
    T[n_, k_] := Sum[b[Array[t &, k], n, k], {t, 2*k - 1, Floor[n*(n + 1)/(2*k) ]}]/k!;
    a[n_] := T[n, 8];
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 15, 25}] (* Jean-François Alcover, Jun 08 2018, after Alois P. Heinz *)

Extensions

a(27)-a(28) from Alois P. Heinz, Nov 05 2014
a(29)-a(32) from Bert Dobbelaere, Sep 01 2019

A196236 Number of different ways to select 9 disjoint subsets from {1..n} with equal element sum.

Original entry on oeis.org

1, 3, 14, 40, 156, 554, 2369, 11841, 60654, 498320, 2987689, 15177178, 96041346, 656938806, 4640699138, 31263742313, 221075005249
Offset: 17

Views

Author

Alois P. Heinz, Sep 29 2011

Keywords

Examples

			a(18) = 3: {1,16}, {2,15}, {3,14}, {4,13}, {5,12}, {6,11}, {7,10}, {8,9}, {17} have element sum 17; {1,17}, {2,16}, {3,15}, {4,14}, {5,13}, {6,12}, {7,11}, {8,10}, {18} have element sum 18; {1,18}, {2,17}, {3,16}, {4,15}, {5,14}, {6,13}, {7,12}, {8,11}, {9,10} have element sum 19.
		

Crossrefs

Programs

  • Mathematica
    b[l_, n_, k_] := b[l, n, k] = Module[{i, j}, If[l == Array[0 &, k], 1, If[Total[l] > n*(n - 1)/2, 0, b[l, n - 1, k]] + Sum[If[l[[j]] - n < 0, 0, b[Sort[Table[l[[i]] - If[i == j, n, 0], {i, 1, k}]], n - 1, k]], {j, 1, k}]]];
    T[n_, k_] := Sum[b[Array[t &, k], n, k], {t, 2*k - 1, Floor[n*(n+1)/(2*k) ]}]/k!;
    a[n_] := T[n, 9];
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 17, 25}] (* Jean-François Alcover, Jun 08 2018, after Alois P. Heinz *)

Extensions

a(29) from Alois P. Heinz, Nov 05 2014
a(30)-a(33) from Bert Dobbelaere, Sep 02 2019
Showing 1-10 of 15 results. Next