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

A196723 Number of subsets of {1..n} (including empty set) such that the pairwise sums of distinct elements are all distinct.

Original entry on oeis.org

1, 2, 4, 8, 15, 28, 50, 86, 143, 236, 376, 594, 913, 1380, 2048, 3016, 4367, 6302, 8974, 12670, 17685, 24580, 33738, 46072, 62367, 83990, 112342, 149734, 198153, 261562, 343210, 448694, 583445, 756846, 976086, 1255658, 1607831, 2053186, 2610560, 3312040, 4183689
Offset: 0

Views

Author

Alois P. Heinz, Oct 06 2011

Keywords

Comments

The number of subsets of {1..n} such that every orderless pair of (not necessarily distinct) elements has a different sum is A143823(n).

Examples

			a(4) = 15: {}, {1}, {2}, {3}, {4}, {1,2}, {1,3}, {1,4}, {2,3}, {2,4}, {3,4}, {1,2,3}, {1,2,4}, {1,3,4}, {2,3,4}.
		

Crossrefs

The subset case is A196723 (this sequence).
The maximal case is A325878.
The integer partition case is A325857.
The strict integer partition case is A325877.
Heinz numbers of the counterexamples are given by A325991.

Programs

  • Maple
    b:= proc(n, s) local sn, m;
          m:= nops(s);
          sn:= [s[], n];
          `if`(n<1, 1, b(n-1, s) +`if`(m*(m+1)/2 = nops(({seq(seq(
           sn[i]+sn[j], j=i+1..m+1), i=1..m)})), b(n-1, sn), 0))
        end:
    a:= proc(n) option remember;
          b(n-1, [n]) +`if`(n=0, 0, a(n-1))
        end:
    seq(a(n), n=0..20);
  • Mathematica
    b[n_, s_] := b[n, s] = Module[{sn, m}, m = Length[s]; sn = Append[s, n]; If[n<1, 1, b[n-1, s] + If[m*(m+1)/2 == Length[ Union[ Flatten[ Table[ sn[[i]] + sn[[j]], {i, 1, m}, {j, i+1, m+1}]]]], b[n-1, sn], 0]]];
    a[n_] := a[n] = b[n-1, {n}] + If[n == 0, 0, a[n-1]]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jan 31 2017, translated from Maple *)
    Table[Length[Select[Subsets[Range[n]],UnsameQ@@Plus@@@Subsets[#,{2}]&]],{n,0,10}] (* Gus Wiseman, Jun 03 2019 *)

Extensions

Edited by Gus Wiseman, Jun 03 2019

A325860 Number of subsets of {1..n} such that every pair of distinct elements has a different quotient.

Original entry on oeis.org

1, 2, 4, 8, 14, 28, 52, 104, 188, 308, 548, 1096, 1784, 3568, 6168, 10404, 16200, 32400, 49968, 99936, 155584, 256944, 433736, 867472, 1297504, 2026288, 3387216, 5692056, 8682912, 17365824, 25243200, 50486400, 78433056, 125191968, 206649216, 328195632
Offset: 0

Views

Author

Gus Wiseman, May 31 2019

Keywords

Comments

Also subsets of {1..n} such that every orderless pair of (not necessarily distinct) elements has a different product.

Examples

			The a(0) = 1 through a(4) = 14 subsets:
  {}  {}   {}    {}     {}
      {1}  {1}   {1}    {1}
           {2}   {2}    {2}
           {12}  {3}    {3}
                 {12}   {4}
                 {13}   {12}
                 {23}   {13}
                 {123}  {14}
                        {23}
                        {24}
                        {34}
                        {123}
                        {134}
                        {234}
		

Crossrefs

The subset case is A325860.
The maximal case is A325861.
The integer partition case is A325853.
The strict integer partition case is A325854.
Heinz numbers of the counterexamples are given by A325994.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],UnsameQ@@Divide@@@Subsets[#,{2}]&]],{n,0,20}]

Extensions

a(21)-a(25) from Alois P. Heinz, Jun 07 2019
a(26)-a(35) from Fausto A. C. Cariboni, Oct 04 2020

A326076 Number of subsets of {1..n} containing all of their integer products <= n.

Original entry on oeis.org

1, 2, 4, 8, 12, 24, 44, 88, 152, 232, 444, 888, 1576, 3152, 6136, 11480, 17112, 34224, 63504, 127008, 232352, 442208, 876944, 1753888, 3138848, 4895328, 9739152, 18141840, 34044720, 68089440, 123846624, 247693248, 469397440, 924014144, 1845676384, 3469128224, 5182711584
Offset: 0

Views

Author

Gus Wiseman, Jun 05 2019

Keywords

Comments

The strict case is A326081.

Examples

			The a(0) = 1 through a(4) = 12 sets:
  {}  {}   {}     {}       {}
      {1}  {1}    {1}      {1}
           {2}    {2}      {3}
           {1,2}  {3}      {4}
                  {1,2}    {1,3}
                  {1,3}    {1,4}
                  {2,3}    {2,4}
                  {1,2,3}  {3,4}
                           {1,2,4}
                           {1,3,4}
                           {2,3,4}
                           {1,2,3,4}
The a(6) = 44 sets:
  {}  {1}  {1,3}  {1,2,4}  {1,2,4,5}  {1,2,3,4,6}  {1,2,3,4,5,6}
      {3}  {1,4}  {1,3,4}  {1,2,4,6}  {1,2,4,5,6}
      {4}  {1,5}  {1,3,5}  {1,3,4,5}  {1,3,4,5,6}
      {5}  {1,6}  {1,3,6}  {1,3,4,6}  {2,3,4,5,6}
      {6}  {2,4}  {1,4,5}  {1,3,5,6}
           {3,4}  {1,4,6}  {1,4,5,6}
           {3,5}  {1,5,6}  {2,3,4,6}
           {3,6}  {2,4,5}  {2,4,5,6}
           {4,5}  {2,4,6}  {3,4,5,6}
           {4,6}  {3,4,5}
           {5,6}  {3,4,6}
                  {3,5,6}
                  {4,5,6}
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],SubsetQ[#,Select[Times@@@Tuples[#,2],#<=n&]]&]],{n,0,10}]
  • PARI
    a(n)={
        my(lim=vector(n, k, sqrtint(k)));
        my(accept(b, k)=for(i=2, lim[k], if(k%i ==0 && bittest(b, i) && bittest(b, k/i), return(0))); 1);
        my(recurse(k, b)=
          my(m=1);
          for(j=max(2*k, n\2+1), min(2*k+1, n), if(accept(b, j), m*=2));
          k++;
          m*if(k > n\2, 1, self()(k, b + (1<Andrew Howroyd, Aug 30 2019

Formula

a(n) = 2*A326114(n) for n > 0. - Andrew Howroyd, Aug 30 2019

Extensions

a(16)-a(30) from Andrew Howroyd, Aug 16 2019
Terms a(31) and beyond from Andrew Howroyd, Aug 30 2019

A326117 Number of subsets of {1..n} containing no products of two or more distinct elements.

Original entry on oeis.org

1, 2, 3, 5, 9, 17, 29, 57, 101, 201, 365, 729, 1233, 2465, 4593, 8297, 15921, 31841, 55953, 111905, 195713, 362337, 697361, 1394721, 2334113, 4668225, 9095393, 17225313, 31242785, 62485569, 106668609, 213337217, 392606529, 755131841, 1491146913, 2727555425, 4947175713
Offset: 0

Views

Author

Gus Wiseman, Jun 06 2019

Keywords

Comments

If this sequence counts product-free sets, A326081 counts product-closed sets.

Examples

			The a(6) = 28 sets:
  {}  {1}  {2,3}  {2,3,4}  {2,3,4,5}
      {2}  {2,4}  {2,3,5}  {2,4,5,6}
      {3}  {2,5}  {2,4,5}  {3,4,5,6}
      {4}  {2,6}  {2,4,6}
      {5}  {3,4}  {2,5,6}
      {6}  {3,5}  {3,4,5}
           {3,6}  {3,4,6}
           {4,5}  {3,5,6}
           {4,6}  {4,5,6}
           {5,6}
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Intersection[#,Select[Times@@@Subsets[#,{2}],#<=n&]]=={}&]],{n,0,20}]

Formula

For n > 0, a(n) = A326116(n) + 1.

Extensions

Terms a(21)-a(36) from Andrew Howroyd, Aug 30 2019

A325859 Number of maximal subsets of {1..n} such that every orderless pair of distinct elements has a different product.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 4, 4, 11, 11, 28, 28, 60, 60, 140, 241, 299, 299, 572, 572, 971
Offset: 0

Views

Author

Gus Wiseman, May 31 2019

Keywords

Examples

			The a(1) = 1 through a(9) = 11 subsets:
  {1}  {12}  {123}  {1234}  {12345}  {2356}   {23567}   {123457}  {235678}
                                     {12345}  {123457}  {123578}  {1234579}
                                     {12456}  {124567}  {124567}  {1235789}
                                     {13456}  {134567}  {125678}  {1245679}
                                                        {134567}  {1256789}
                                                        {134578}  {1345679}
                                                        {135678}  {1345789}
                                                        {145678}  {1356789}
                                                        {234578}  {1456789}
                                                        {235678}  {2345789}
                                                        {245678}  {2456789}
		

Crossrefs

The subset case is A196724.
The maximal case is A325859.
The integer partition case is A325856.
The strict integer partition case is A325855.
Heinz numbers of the counterexamples are given by A325993.

Programs

  • Mathematica
    fasmax[y_]:=Complement[y,Union@@(Most[Subsets[#]]&/@y)];
    Table[Length[fasmax[Select[Subsets[Range[n]],UnsameQ@@Times@@@Subsets[#,{2}]&]]],{n,0,15}]

A325861 Number of maximal subsets of {1..n} such that every pair of distinct elements has a different quotient.

Original entry on oeis.org

1, 1, 1, 1, 3, 3, 6, 6, 9, 13, 32, 32, 57, 57, 140, 229, 373, 373, 549, 549, 825
Offset: 0

Views

Author

Gus Wiseman, May 31 2019

Keywords

Examples

			The a(1) = 1 through a(9) = 13 subsets:
  {1}  {12}  {123}  {123}  {1235}  {1235}   {12357}   {23457}   {24567}
                    {134}  {1345}  {1256}   {12567}   {24567}   {123578}
                    {234}  {2345}  {2345}   {23457}   {123578}  {134567}
                                   {2356}   {23567}   {125678}  {134578}
                                   {2456}   {24567}   {134567}  {135678}
                                   {13456}  {134567}  {134578}  {145678}
                                                      {135678}  {145789}
                                                      {145678}  {234579}
                                                      {235678}  {235678}
                                                                {235789}
                                                                {345789}
                                                                {356789}
                                                                {1256789}
		

Crossrefs

The subset case is A325860.
The maximal case is A325861.
The integer partition case is A325853.
The strict integer partition case is A325854.
Heinz numbers of the counterexamples are given by A325994.

Programs

  • Mathematica
    fasmax[y_]:=Complement[y,Union@@(Most[Subsets[#]]&/@y)];
    Table[Length[fasmax[Select[Subsets[Range[n]],UnsameQ@@Divide@@@Subsets[#,{2}]&]]],{n,0,10}]

A325853 Number of integer partitions of n such that every pair of distinct parts has a different quotient.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 14, 21, 28, 39, 51, 69, 88, 116, 148, 193, 242, 309, 385, 484, 596, 746, 915, 1128, 1371, 1679, 2030, 2460, 2964, 3570, 4268, 5115, 6088, 7251, 8584, 10175, 12002, 14159, 16619, 19526, 22846, 26713, 31153, 36300, 42169, 48990, 56728
Offset: 0

Views

Author

Gus Wiseman, May 31 2019

Keywords

Comments

Also the number of integer partitions of n such that every orderless pair of (not necessarily distinct) parts has a different product.

Examples

			The a(1) = 1 through a(7) = 14 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)
       (11)  (21)   (22)    (32)     (33)      (43)
             (111)  (31)    (41)     (42)      (52)
                    (211)   (221)    (51)      (61)
                    (1111)  (311)    (222)     (322)
                            (2111)   (321)     (331)
                            (11111)  (411)     (511)
                                     (2211)    (2221)
                                     (3111)    (3211)
                                     (21111)   (4111)
                                     (111111)  (22111)
                                               (31111)
                                               (211111)
                                               (1111111)
The one partition of 7 for which not every pair of distinct parts has a different quotient is (4,2,1).
		

Crossrefs

The subset case is A325860.
The maximal case is A325861.
The integer partition case is A325853.
The strict integer partition case is A325854.
Heinz numbers of the counterexamples are given by A325994.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@Divide@@@Subsets[Union[#],{2}]&]],{n,0,20}]

A325994 Heinz numbers of integer partitions such that not every ordered pair of distinct parts has a different quotient.

Original entry on oeis.org

42, 84, 126, 168, 210, 230, 252, 294, 336, 378, 390, 399, 420, 460, 462, 504, 546, 588, 630, 672, 690, 714, 742, 756, 780, 798, 840, 882, 920, 924, 966, 1008, 1050, 1092, 1134, 1150, 1170, 1176, 1197, 1218, 1260, 1302, 1344, 1365, 1380, 1386, 1428, 1470, 1484
Offset: 1

Views

Author

Gus Wiseman, Jun 02 2019

Keywords

Comments

The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).

Examples

			The sequence of terms together with their prime indices begins:
    42: {1,2,4}
    84: {1,1,2,4}
   126: {1,2,2,4}
   168: {1,1,1,2,4}
   210: {1,2,3,4}
   230: {1,3,9}
   252: {1,1,2,2,4}
   294: {1,2,4,4}
   336: {1,1,1,1,2,4}
   378: {1,2,2,2,4}
   390: {1,2,3,6}
   399: {2,4,8}
   420: {1,1,2,3,4}
   460: {1,1,3,9}
   462: {1,2,4,5}
   504: {1,1,1,2,2,4}
   546: {1,2,4,6}
   588: {1,1,2,4,4}
   630: {1,2,2,3,4}
   672: {1,1,1,1,1,2,4}
		

Crossrefs

The subset case is A325860.
The maximal case is A325861.
The integer partition case is A325853.
The strict integer partition case is A325854.
Heinz numbers of the counterexamples are given by A325994.

Programs

  • Mathematica
    Select[Range[1000],!UnsameQ@@Divide@@@Subsets[PrimePi/@First/@FactorInteger[#],{2}]&]

A325854 Number of strict integer partitions of n such that every pair of distinct parts has a different quotient.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 4, 6, 8, 9, 12, 13, 16, 20, 23, 30, 33, 41, 47, 52, 61, 75, 90, 98, 116, 132, 151, 173, 206, 226, 263, 297, 337, 387, 427, 488, 555, 623, 697, 782, 886, 984, 1108, 1240, 1374, 1545, 1726, 1910, 2120, 2358, 2614, 2903, 3218, 3567, 3933
Offset: 0

Views

Author

Gus Wiseman, May 31 2019

Keywords

Comments

Also the number of strict integer partitions of n such that every pair of (not necessarily distinct) parts has a different product.

Examples

			The a(1) = 1 through a(10) = 9 partitions (A = 10):
  (1)  (2)  (3)   (4)   (5)   (6)    (7)   (8)    (9)    (A)
            (21)  (31)  (32)  (42)   (43)  (53)   (54)   (64)
                        (41)  (51)   (52)  (62)   (63)   (73)
                              (321)  (61)  (71)   (72)   (82)
                                           (431)  (81)   (91)
                                           (521)  (432)  (532)
                                                  (531)  (541)
                                                  (621)  (631)
                                                         (721)
The two strict partitions of 13 such that not every pair of distinct parts has a different quotient are (9,3,1) and (6,4,2,1).
		

Crossrefs

The subset case is A325860.
The maximal case is A325861.
The integer partition case is A325853.
The strict integer partition case is A325854.
Heinz numbers of the counterexamples are given by A325994.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&UnsameQ@@Divide@@@Subsets[Union[#],{2}]&]],{n,0,30}]

A325856 Number of integer partitions of n such that every pair of distinct parts has a different product.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, 76, 100, 133, 171, 225, 287, 369, 467, 592, 740, 931, 1155, 1435, 1767, 2178, 2661, 3254, 3953, 4798, 5793, 6991, 8390, 10069, 12022, 14346, 17054, 20255, 23960, 28334, 33390, 39308, 46148, 54116, 63295, 73967, 86224
Offset: 0

Views

Author

Gus Wiseman, May 31 2019

Keywords

Examples

			The five partitions of 15 not satisfying the condition are:
  (8,4,2,1)
  (6,4,3,2)
  (6,3,3,2,1)
  (6,3,2,2,1,1)
  (6,3,2,1,1,1,1)
		

Crossrefs

The subset case is A196724.
The maximal case is A325859.
The integer partition case is A325856.
The strict integer partition case is A325855.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@Times@@@Subsets[Union[#],{2}]&]],{n,0,30}]
Showing 1-10 of 24 results. Next