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-3 of 3 results.

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

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

A248112 Number T(n,k) of subsets of {1,...,n} containing n and having at least one set partition into k blocks with equal element sum; triangle T(n,k), n>=1, 1<=k<=floor((n+1)/2), read by rows.

Original entry on oeis.org

1, 2, 4, 1, 8, 2, 16, 4, 1, 32, 10, 2, 64, 20, 5, 1, 128, 44, 12, 2, 256, 93, 29, 6, 1, 512, 198, 63, 14, 2, 1024, 414, 146, 37, 7, 1, 2048, 864, 329, 88, 16, 2, 4096, 1788, 722, 218, 49, 8, 1, 8192, 3687, 1613, 515, 118, 19, 2, 16384, 7541, 3505, 1226, 313, 62, 9, 1
Offset: 1

Views

Author

Alois P. Heinz, Oct 01 2014

Keywords

Examples

			T(7,3) = 5: {2,3,4,5,7}-> 25/34/7, {1,3,4,6,7}-> 16/34/7, {1,2,5,6,7}-> 16/25/7, {1,2,3,5,6,7}-> 17/26/35, {2,3,4,5,6,7}-> 27/36/45.
T(8,4) = 2: {1,2,3,5,6,7,8}-> 17/26/35/8, {1,2,3,4,5,6,7,8}-> 18/27/36/45.
T(9,5) = 1: {1,2,3,5,6,7,8,9}-> 18/27/36/45/9.
Triangle T(n,k) begins:
01 :    1;
02 :    2;
03 :    4,   1;
04 :    8,   2;
05 :   16,   4,   1;
06 :   32,  10,   2;
07 :   64,  20,   5,  1;
08 :  128,  44,  12,  2;
09 :  256,  93,  29,  6,  1;
10 :  512, 198,  63, 14,  2;
11 : 1024, 414, 146, 37,  7, 1;
12 : 2048, 864, 329, 88, 16, 2;
		

Crossrefs

Programs

  • Maple
    b:= proc(l, i) option remember; local k, r, j;
          k, r:= nops(l), {};
          if i*(i+1)/2 < l[-1]*k-add(j, j=l) then r
        elif i=0 then {r}
        else for j to k do r:= r union map(y->y union {i}, b((p->
               map(x->x-p[1], p))(sort(subsop(j=l[j]+i, l))), i-1))
             od;
             r union b(l, i-1)
          fi
        end:
    A:= (n, k)-> `if`(k=1, 2^(n-1), nops(b([0$(k-1), n], n-1))):
    seq(seq(A(n, k), k=1..iquo(n+1, 2)), n=1..15);
  • Mathematica
    b[l_, i_] := b[l, i] = Module[{k, r, j}, {k, r} = {Length[l], {}}; Which[ i*(i+1)/2 < l[[-1]]*k - Total[l], r, i == 0, {r}, True, For[j = 1, j <= k, j++, r = r ~Union~ Map[# ~Union~ {i}&, b[Function[p, Map[#-p[[1]]&, p] ][Sort[ReplacePart[l, j -> l[[j]]+i]]], i-1]]]; r ~Union~ b[l, i-1]]]; A[n_, k_] := If[k==1, 2^(n-1), Length[b[Append[Array[0&, (k-1)], n], n-1] ]]; Table[A[n, k], {n, 1, 15}, {k, 1, Quotient[n+1, 2]}] // Flatten (* Jean-François Alcover, Feb 03 2017, Translated from Maple *)
Showing 1-3 of 3 results.