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

A188431 The number of n-full sets, F(n).

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 1, 2, 1, 2, 3, 4, 5, 7, 7, 8, 9, 11, 10, 13, 14, 17, 20, 25, 28, 34, 40, 46, 54, 62, 69, 80, 90, 102, 115, 131, 144, 167, 186, 213, 239, 273, 304, 349, 388, 441, 495, 563, 625, 710, 790, 890, 990, 1114, 1232, 1387, 1530, 1713, 1894, 2119, 2330, 2605, 2866, 3192, 3512, 3910, 4289, 4774, 5237, 5809, 6377, 7068, 7739
Offset: 0

Views

Author

Madjid Mirzavaziri, Mar 31 2011

Keywords

Comments

Let A be a set of positive integers. We say that A is n-full if (sum A)=[n] for a positive integer n, where (sum A) is the set of all positive integers which are a sum of distinct elements of A and [n]={1,2,...,n}. Then F(n) denotes the number of n-full sets.
Also the number of distinct and complete partitions of n, by definition, which are counted by A000009 and A126796. - George Beck, Nov 06 2017
An integer partition of n is complete (see also A325781) if every number from 0 to n is the sum of some submultiset of the parts. The Heinz numbers of these partitions are given by A325986. - Gus Wiseman, May 31 2019

Examples

			a(26) = 10, because there are 10 26-full sets: {1,2,4,5,6,8}, {1,2,3,5,7,8}, {1,2,3,5,6,9}, {1,2,3,4,7,9}, {1,2,3,4,6,10}, {1,2,3,4,5,11}, {1,2,4,8,11}, {1,2,4,7,12}, {1,2,4,6,13}, {1,2,3,7,13}.
G.f.: 1 = 1/(1+x) + 1*x/((1+x)*(1+x^2)) + 0*x^2/((1+x)*(1+x^2)*(1+x^3)) + 1*x^3/((1+x)*(1+x^2)*(1+x^3)*(1+x^4)) +...+ a(n)*x^n / Product_{k=1..n+1} (1+x^k) +...
		

Crossrefs

Programs

  • Haskell
    import Data.MemoCombinators (memo2, integral, Memo)
    a188431 n = a188431_list !! (n-1)
    a188431_list = map
       (\x -> sum [fMemo x i | i <- [a188429 x .. a188430 x]]) [1..] where
       fMemo = memo2 integral integral f
       f _ 1 = 1
       f m i = sum [fMemo (m - i) j |
                    j <- [a188429 (m - i) .. min (a188430 (m - i)) (i - 1)]]
    -- Reinhard Zumkeller, Aug 06 2015
  • Maple
    sums:= proc(s) local i, m;
              m:= max(s[]);
             `if`(m<1, {}, {m, seq([i, i+m][], i=sums(s minus {m}))})
           end:
    a:= proc(n) local b;
          b:= proc(i,s) local si;
                if i=1 then `if`(sums(s)={$1..n}, 1, 0)
              else si:= s union {i};
                   b(i-1, s)+ `if`(max(sums(si)[])>n, 0, b(i-1, si))
                fi
              end; b(n, {1})
        end:
    seq(a(n), n=1..40);  # Alois P. Heinz, Apr 03 2011
    # second Maple program:
    b:= proc(n, i) option remember; `if`(i*(i+1)/2n or i>n-i+1, 0, b(n-i, i-1))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..80);  # Alois P. Heinz, May 20 2017
  • Mathematica
    Sums[s_] := Sums[s] = With[{m = Max[s]}, If[m < 1, {}, Union @ Flatten @ Join[{m}, Table[{i, i + m}, {i, Sums[s ~Complement~ {m}]}]]]];
    a[n_] := Module[{b}, b[i_, s_] := b[i, s] = Module[{si}, If[i == 1, If[Sums[s] == Range[n], 1, 0], si = s ~Union~ {i}; b[i-1, s] + If[Max[ Sums[si]] > n, 0, b[i - 1, si]]]]; b[n, {1}]];
    Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 80}] (* Jean-François Alcover, Apr 12 2017, after Alois P. Heinz *)
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&Union[Total/@Union[Subsets[#]]]==Range[0,n]&]],{n,30}] (* Gus Wiseman, May 31 2019 *)
  • PARI
    /* As coefficients in g.f. */
    {a(n)=local(A=[1]); for(i=1, n+1, A=concat(A,0); A[#A]=polcoeff(1 - sum(m=1,#A,A[m]*x^m/prod(k=1, m, 1+x^k +x*O(x^#A) )), #A) ); A[n+1]}
    for(n=0, 50, print1(a(n),", ")) /* Paul D. Hanna, Mar 06 2012 */
    

Formula

F(n) = Sum_(i=L(n) .. U(n), F(n,i)), where F(n,i) = Sum_(j=L(n-i) .. min(U(n-i),i-1), F(n-i,j) ) and L(n), U(n) are defined in A188429 and A188430, respectively.
G.f.: 1 = Sum_{n>=0} a(n)*x^n / Product_{k=1..n+1} (1+x^k), with a(0)=1. - Paul D. Hanna, Mar 08 2012
a(n) ~ c * exp(Pi*sqrt(n/3)) / n^(3/4), where c = 0.03316508... - Vaclav Kotesovec, Oct 21 2019

Extensions

More terms from Alois P. Heinz, Apr 03 2011
a(0)=1 prepended by Alois P. Heinz, May 20 2017

A326020 Number of complete subsets of {1..n}.

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 15, 27, 50, 95, 185, 365, 724, 1441, 2873, 5735, 11458, 22902, 45789, 91561, 183102, 366180, 732331, 1464626, 2929209, 5858367, 11716674, 23433277, 46866473, 93732852, 187465596, 374931067, 749861989, 1499723808, 2999447418
Offset: 0

Views

Author

Gus Wiseman, Jun 04 2019

Keywords

Comments

A set of positive integers summing to n is complete if every nonnegative integer up to n is the sum of some subset.

Examples

			The a(0) = 1 through a(6) = 15 subsets:
  {}  {}   {}     {}       {}         {}           {}
      {1}  {1}    {1}      {1}        {1}          {1}
           {1,2}  {1,2}    {1,2}      {1,2}        {1,2}
                  {1,2,3}  {1,2,3}    {1,2,3}      {1,2,3}
                           {1,2,4}    {1,2,4}      {1,2,4}
                           {1,2,3,4}  {1,2,3,4}    {1,2,3,4}
                                      {1,2,3,5}    {1,2,3,5}
                                      {1,2,4,5}    {1,2,3,6}
                                      {1,2,3,4,5}  {1,2,4,5}
                                                   {1,2,4,6}
                                                   {1,2,3,4,5}
                                                   {1,2,3,4,6}
                                                   {1,2,3,5,6}
                                                   {1,2,4,5,6}
                                                   {1,2,3,4,5,6}
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Union[Plus@@@Subsets[#]]==Range[0,Total[#]]&]],{n,0,10}]

Extensions

a(17)-a(34) from Charlie Neder, Jun 05 2019

A325788 Number of complete strict necklace compositions of n.

Original entry on oeis.org

1, 0, 1, 0, 0, 2, 2, 0, 0, 4, 4, 4, 4, 0, 20, 6, 16, 12, 10, 0, 84, 40, 74, 42, 66, 38, 22, 254, 238, 188, 356, 242, 272, 150, 148, 1140, 1058, 1208, 1546, 1288
Offset: 1

Views

Author

Gus Wiseman, May 22 2019

Keywords

Comments

A strict necklace composition of n is a finite sequence of distinct positive integers summing to n that is lexicographically minimal among all of its cyclic rotations. In other words, it is a strict composition of n starting with its least part (counted by A032153). A circular subsequence is a sequence of consecutive terms where the last and first parts are also considered consecutive. A necklace composition of n is complete if every positive integer from 1 to n is the sum of some circular subsequence.

Examples

			The a(1) = 1 through a(16) = 6 complete strict necklace compositions (empty columns not shown):
  (1)  (12)  (123)  (124)  (1234)  (1253)  (1245)  (1264)  (12345)  (12634)
             (132)  (142)  (1324)  (1325)  (1326)  (1327)  (12354)  (13624)
                           (1423)  (1352)  (1542)  (1462)  (12435)  (14263)
                           (1432)  (1523)  (1623)  (1723)  (12453)  (14326)
                                                           (12543)  (14362)
                                                           (13254)  (16234)
                                                           (13425)
                                                           (13452)
                                                           (13524)
                                                           (13542)
                                                           (14235)
                                                           (14253)
                                                           (14325)
                                                           (14523)
                                                           (14532)
                                                           (15234)
                                                           (15243)
                                                           (15324)
                                                           (15342)
                                                           (15432)
		

Crossrefs

Programs

  • Mathematica
    neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    subalt[q_]:=Union[ReplaceList[q,{_,s__,_}:>{s}],DeleteCases[ReplaceList[q,{t___,,u___}:>{u,t}],{}]];
    Table[Length[Select[Join@@Permutations/@Select[IntegerPartitions[n],UnsameQ@@#&],neckQ[#]&&Union[Total/@subalt[#]]==Range[n]&]],{n,30}]

A325790 Number of permutations of {1..n} such that every positive integer from 1 to n * (n + 1)/2 is the sum of some circular subsequence.

Original entry on oeis.org

1, 1, 2, 6, 16, 100, 492, 1764, 8592, 71208, 395520, 1679480, 9313128, 72154030, 420375872, 1625653650
Offset: 0

Views

Author

Gus Wiseman, May 23 2019

Keywords

Comments

A circular subsequence is a sequence of consecutive non-overlapping terms where the last and first parts are also considered consecutive. The only circular subsequence of maximum length is the sequence itself (not any rotation of it). For example, the circular subsequences of (2,1,3) are: (), (1), (2), (3), (1,3), (2,1), (3,2), (2,1,3).

Examples

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

Crossrefs

Programs

  • Mathematica
    subalt[q_]:=Union[ReplaceList[q,{_,s__,_}:>{s}],DeleteCases[ReplaceList[q,{t___,,u___}:>{u,t}],{}]];
    Table[Length[Select[Permutations[Range[n]],Range[n*(n+1)/2]==Union[Total/@subalt[#]]&]],{n,0,5}]
  • PARI
    weigh(p)={my(b=0); for(i=1, #p, my(s=0,j=i); for(k=1, #p, s+=p[j]; if(!bittest(b,s), b=bitor(b,1<Andrew Howroyd, Aug 16 2019

Extensions

a(10)-a(12) from Andrew Howroyd, Aug 18 2019
a(13)-a(15) from Bert Dobbelaere, Nov 01 2020

A326036 Number of uniform complete integer partitions of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 2, 2, 2, 2, 2, 6, 3, 3, 5, 5, 3, 8, 5, 11, 10, 10, 9, 19, 13, 15, 17, 21, 18, 35, 26, 39, 40, 50, 50, 77, 63, 84, 88, 113, 103, 146, 132, 171, 180, 212, 214, 292, 276, 345, 363, 435, 442, 561, 569, 694, 729, 853, 891, 1108
Offset: 0

Views

Author

Gus Wiseman, Jun 04 2019

Keywords

Comments

An integer partition of n is uniform if all parts appear with the same multiplicity, and complete if every nonnegative integer up to n is the sum of some submultiset.

Examples

			The initial terms count the following partitions:
   0: ()
   1: (1)
   2: (11)
   3: (21)
   3: (111)
   4: (1111)
   5: (11111)
   6: (321)
   6: (2211)
   6: (111111)
   7: (421)
   7: (1111111)
   8: (3311)
   8: (11111111)
   9: (222111)
   9: (111111111)
  10: (4321)
  10: (1111111111)
  11: (5321)
  11: (11111111111)
		

Crossrefs

Programs

  • Mathematica
    sums[ptn_]:=sums[ptn]=If[Length[ptn]==1,ptn,Union@@(Join[sums[#],sums[#]+Total[ptn]-Total[#]]&/@Union[Table[Delete[ptn,i],{i,Length[ptn]}]])];
    Table[Length[Select[IntegerPartitions[n],SameQ@@Length/@Split[#]&&Sort[sums[Sort[#]]]==Range[Total[#]]&]],{n,0,30}]

A325786 Number of complete necklace compositions of n.

Original entry on oeis.org

1, 1, 2, 2, 4, 7, 12, 19, 41, 71, 141, 255, 509, 924, 1882, 3395, 6838, 12715, 25233, 47049
Offset: 1

Views

Author

Gus Wiseman, May 22 2019

Keywords

Comments

A necklace composition of n is a finite sequence of positive integers summing to n that is lexicographically minimal among all of its cyclic rotations. A circular subsequence is a sequence of consecutive terms where the first and last parts are also considered consecutive. A necklace composition of n is complete if every positive integer from 1 to n is the sum of some circular subsequence.

Examples

			The a(1) = 1 through a(8) = 19 necklace compositions:
  (1)  (11)  (12)   (112)   (113)    (123)     (124)      (1124)
             (111)  (1111)  (122)    (132)     (142)      (1133)
                            (1112)   (1113)    (1114)     (1142)
                            (11111)  (1122)    (1123)     (1214)
                                     (1212)    (1132)     (1223)
                                     (11112)   (1213)     (1322)
                                     (111111)  (1222)     (11114)
                                               (11113)    (11123)
                                               (11122)    (11132)
                                               (11212)    (11213)
                                               (111112)   (11222)
                                               (1111111)  (11312)
                                                          (12122)
                                                          (111113)
                                                          (111122)
                                                          (111212)
                                                          (112112)
                                                          (1111112)
                                                          (11111111)
		

Crossrefs

Programs

  • Mathematica
    neckQ[q_]:=Array[OrderedQ[{q,RotateRight[q,#]}]&,Length[q]-1,1,And];
    subalt[q_]:=Union[ReplaceList[q,{_,s__,_}:>{s}],DeleteCases[ReplaceList[q,{t___,,u___}:>{u,t}],{}]];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],neckQ[#]&&Union[Total/@subalt[#]]==Range[n]&]],{n,15}]

A326021 Number of complete subsets of {1..n} with maximum n.

Original entry on oeis.org

1, 1, 1, 2, 3, 6, 12, 23, 45, 90, 180, 359, 717, 1432, 2862, 5723, 11444, 22887, 45772, 91541, 183078, 366151, 732295, 1464583, 2929158, 5858307, 11716603, 23433196, 46866379, 93732744, 187465471, 374930922, 749861819, 1499723610
Offset: 1

Views

Author

Gus Wiseman, Jun 04 2019

Keywords

Comments

A set of positive integers summing to n is complete if every nonnegative integer up to n is the sum of some subset.

Examples

			The a(1) = 1 through a(7) = 12 subsets:
  {1}  {1,2}  {1,2,3}  {1,2,4}    {1,2,3,5}    {1,2,3,6}      {1,2,3,7}
                       {1,2,3,4}  {1,2,4,5}    {1,2,4,6}      {1,2,4,7}
                                  {1,2,3,4,5}  {1,2,3,4,6}    {1,2,3,4,7}
                                               {1,2,3,5,6}    {1,2,3,5,7}
                                               {1,2,4,5,6}    {1,2,3,6,7}
                                               {1,2,3,4,5,6}  {1,2,4,5,7}
                                                              {1,2,4,6,7}
                                                              {1,2,3,4,5,7}
                                                              {1,2,3,4,6,7}
                                                              {1,2,3,5,6,7}
                                                              {1,2,4,5,6,7}
                                                              {1,2,3,4,5,6,7}
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Max@@#==n&&Union[Plus@@@Subsets[#]]==Range[0,Total[#]]&]],{n,10}]

Extensions

a(18)-a(34) from Charlie Neder, Jun 05 2019

A326022 Number of minimal complete subsets of {1..n} with maximum n.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 2, 4, 8, 8, 8, 10, 14, 25, 40, 49, 62
Offset: 1

Views

Author

Gus Wiseman, Jun 04 2019

Keywords

Comments

A set of positive integers summing to m is complete if every nonnegative integer up to m is the sum of some subset. For example, (1,2,3,6,13) is a complete set because we have:
0 = (empty sum)
1 = 1
2 = 2
3 = 3
4 = 1 + 3
5 = 2 + 3
6 = 6
7 = 6 + 1
8 = 6 + 2
9 = 6 + 3
10 = 1 + 3 + 6
11 = 2 + 3 + 6
12 = 1 + 2 + 3 + 6
and the remaining numbers 13-25 are obtained by adding 13 to each of these.

Examples

			The a(3) = 1 through a(9) = 8 subsets:
  {1,2,3}  {1,2,4}  {1,2,3,5}  {1,2,3,6}  {1,2,3,7}  {1,2,4,8}    {1,2,3,4,9}
                    {1,2,4,5}  {1,2,4,6}  {1,2,4,7}  {1,2,3,5,8}  {1,2,3,5,9}
                                                     {1,2,3,6,8}  {1,2,3,6,9}
                                                     {1,2,3,7,8}  {1,2,3,7,9}
                                                                  {1,2,4,5,9}
                                                                  {1,2,4,6,9}
                                                                  {1,2,4,7,9}
                                                                  {1,2,4,8,9}
		

Crossrefs

Programs

  • Mathematica
    fasmin[y_]:=Complement[y,Union@@Table[Union[s,#]&/@Rest[Subsets[Complement[Union@@y,s]]],{s,y}]];
    Table[Length[fasmin[Select[Subsets[Range[n]],Max@@#==n&&Union[Plus@@@Subsets[#]]==Range[0,Total[#]]&]]],{n,10}]
Showing 1-8 of 8 results.