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

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

A325877 Number of strict integer partitions of n such that every orderless pair of distinct parts has a different sum.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 4, 5, 6, 8, 9, 12, 14, 18, 19, 26, 28, 36, 37, 50, 52, 67, 68, 89, 94, 115, 121, 151, 160, 195, 200, 247, 265, 312, 329, 386, 418, 487, 519, 600, 640, 742, 792, 901, 978, 1088, 1185, 1331, 1453, 1605, 1729, 1925, 2101, 2311, 2524, 2741, 3000
Offset: 0

Views

Author

Gus Wiseman, Jun 02 2019

Keywords

Comments

The non-strict case is A325857.

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)
                                     (421)  (431)  (81)   (91)
                                            (521)  (432)  (532)
                                                   (531)  (541)
                                                   (621)  (631)
                                                          (721)
		

Crossrefs

The subset case is A196723.
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

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

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

Original entry on oeis.org

1, 1, 1, 1, 4, 5, 8, 22, 40, 56, 78, 124, 222, 390, 616, 892, 1220, 1620, 2182, 3042, 4392, 6364, 9054, 12608, 16980, 22244, 28482, 36208, 45864, 58692, 75804, 98440, 128694, 168250, 218558, 281210, 357594, 449402, 560034, 693332, 853546, 1050118, 1293458, 1596144, 1975394
Offset: 0

Views

Author

Gus Wiseman, Jun 02 2019

Keywords

Examples

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

Crossrefs

The subset case is A196723.
The integer partition case is A325857.
The strict integer partition case is A325877.
Heinz numbers of the counterexamples are given by A325991.

Programs

  • Mathematica
    fasmax[y_]:=Complement[y,Union@@(Most[Subsets[#]]&/@y)];
    Table[Length[fasmax[Select[Subsets[Range[n]],UnsameQ@@Plus@@@Subsets[Union[#],{2}]&]]],{n,0,10}]
  • PARI
    a(n)={
       my(ismaxl(b,w)=for(k=1, n, if(!bittest(b,k) && !bitand(w,b< n, ismaxl(b,w),
             my(s=self()(k+1, r, b, w));
             if(!bitand(w,b<Andrew Howroyd, Mar 23 2025

Extensions

a(21) onwards from Andrew Howroyd, Mar 23 2025

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

Original entry on oeis.org

30, 60, 90, 105, 110, 120, 150, 180, 210, 220, 238, 240, 270, 273, 300, 315, 330, 360, 385, 390, 420, 440, 450, 462, 476, 480, 506, 510, 525, 540, 546, 550, 570, 600, 627, 630, 660, 690, 714, 720, 735, 750, 770, 780, 806, 810, 819, 840, 858, 870, 880, 900, 910
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:
   30: {1,2,3}
   60: {1,1,2,3}
   90: {1,2,2,3}
  105: {2,3,4}
  110: {1,3,5}
  120: {1,1,1,2,3}
  150: {1,2,3,3}
  180: {1,1,2,2,3}
  210: {1,2,3,4}
  220: {1,1,3,5}
  238: {1,4,7}
  240: {1,1,1,1,2,3}
  270: {1,2,2,2,3}
  273: {2,4,6}
  300: {1,1,2,3,3}
  315: {2,2,3,4}
  330: {1,2,3,5}
  360: {1,1,1,2,2,3}
  385: {3,4,5}
  390: {1,2,3,6}
		

Crossrefs

The subset case is A143823.
The maximal case is A325879.
The integer partition case is A325858.
The strict integer partition case is A325876.
Heinz numbers of the counterexamples are given by A325992.

Programs

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

A325857 Number of integer partitions of n such that every orderless pair of distinct parts has a different sum.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 41, 55, 74, 97, 125, 165, 209, 269, 335, 428, 527, 664, 804, 1005, 1210, 1496, 1780, 2186, 2586, 3148, 3698, 4473, 5226, 6279, 7290, 8706, 10067, 11950, 13744, 16242, 18605, 21864, 24942, 29184, 33188, 38651, 43782, 50791, 57402, 66300, 74683, 86026, 96658
Offset: 0

Views

Author

Gus Wiseman, May 31 2019

Keywords

Examples

			The A000041(14) - a(14) = 10 partitions of 14 not satisfying the condition are:
  (6,5,2,1)
  (6,4,3,1)
  (5,4,3,2)
  (5,4,2,2,1)
  (4,4,3,2,1)
  (5,4,2,1,1,1)
  (4,3,3,2,1,1)
  (4,3,2,2,2,1)
  (4,3,2,2,1,1,1)
  (4,3,2,1,1,1,1,1)
		

Crossrefs

The subset case is A196723.
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

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

Extensions

Terms a(31) onward from Max Alekseyev, Sep 23 2023

A325993 Heinz numbers of integer partitions such that not every orderless pair of distinct parts has a different product.

Original entry on oeis.org

390, 780, 798, 1170, 1365, 1560, 1596, 1914, 1950, 2340, 2394, 2590, 2730, 2886, 3120, 3192, 3510, 3828, 3900, 3990, 4095, 4290, 4386, 4485, 4680, 4788, 5070, 5170, 5180, 5460, 5586, 5742, 5772, 5850, 6042, 6240, 6384, 6630, 6699, 6825, 7020, 7182, 7410, 7656
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:
   390: {1,2,3,6}
   780: {1,1,2,3,6}
   798: {1,2,4,8}
  1170: {1,2,2,3,6}
  1365: {2,3,4,6}
  1560: {1,1,1,2,3,6}
  1596: {1,1,2,4,8}
  1914: {1,2,5,10}
  1950: {1,2,3,3,6}
  2340: {1,1,2,2,3,6}
  2394: {1,2,2,4,8}
  2590: {1,3,4,12}
  2730: {1,2,3,4,6}
  2886: {1,2,6,12}
  3120: {1,1,1,1,2,3,6}
  3192: {1,1,1,2,4,8}
  3510: {1,2,2,2,3,6}
  3828: {1,1,2,5,10}
  3900: {1,1,2,3,3,6}
  3990: {1,2,3,4,8}
		

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
    Select[Range[1000],!UnsameQ@@Times@@@Subsets[PrimePi/@First/@FactorInteger[#],{2}]&]
Showing 1-6 of 6 results.