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

A364673 Number of (necessarily strict) integer partitions of n containing all of their own first differences.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 2, 1, 2, 2, 2, 5, 2, 2, 4, 2, 3, 6, 4, 4, 8, 4, 4, 10, 8, 7, 8, 13, 9, 15, 12, 13, 17, 20, 15, 31, 24, 27, 32, 33, 32, 50, 42, 45, 53, 61, 61, 85, 76, 86, 101, 108, 118, 137, 141, 147, 179, 184, 196, 222, 244, 257, 295, 324, 348, 380, 433
Offset: 0

Views

Author

Gus Wiseman, Aug 03 2023

Keywords

Examples

			The partition y = (12,6,3,2,1) has differences (6,3,1,1), and {1,3,6} is a subset of {1,2,3,6,12}, so y is counted under a(24).
The a(n) partitions for n = 1, 3, 6, 12, 15, 18, 21:
  (1)  (3)    (6)      (12)       (15)         (18)         (21)
       (2,1)  (4,2)    (8,4)      (10,5)       (12,6)       (14,7)
              (3,2,1)  (6,4,2)    (8,4,2,1)    (9,6,3)      (12,6,3)
                       (5,4,2,1)  (5,4,3,2,1)  (6,5,4,2,1)  (8,6,4,2,1)
                       (6,3,2,1)               (7,5,3,2,1)  (9,5,4,2,1)
                                               (8,4,3,2,1)  (9,6,3,2,1)
                                                            (10,5,3,2,1)
                                                            (6,5,4,3,2,1)
		

Crossrefs

Containing all differences: A007862.
Containing no differences: A364464, strict complement A364536.
Containing at least one difference: A364467, complement A363260.
For subsets of {1..n} we have A364671, complement A364672.
A non-strict version is A364674.
For submultisets instead of subsets we have A364675.
A000041 counts integer partitions, strict A000009.
A008284 counts partitions by length, strict A008289.
A236912 counts sum-free partitions w/o re-used parts, complement A237113.
A325325 counts partitions with distinct first differences.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&SubsetQ[#,-Differences[#]]&]],{n,0,30}]
  • Python
    from collections import Counter
    def A364673_list(maxn):
        count = Counter()
        for i in range(maxn//3):
            A,f,i = [[(i+1, )]],0,0
            while f == 0:
                A.append([])
                for j in A[i]:
                    for k in j:
                        x = j + (j[-1] + k, )
                        y = sum(x)
                        if y <= maxn:
                            A[i+1].append(x)
                            count.update({y})
                if len(A[i+1]) < 1: f += 1
                i += 1
        return [count[z]+1 for z in range(maxn+1)] # John Tyler Rascoe, Mar 09 2024

A364671 Number of subsets of {1..n} containing all of their own first differences.

Original entry on oeis.org

1, 2, 4, 6, 10, 14, 23, 34, 58, 96, 171, 302, 565, 1041, 1969, 3719, 7105, 13544, 25999, 49852, 95949, 184658, 356129, 687068, 1327540, 2566295, 4966449, 9617306, 18640098, 36150918, 70166056, 136272548, 264844111, 515036040, 1002211421, 1951345157, 3801569113
Offset: 0

Views

Author

Gus Wiseman, Aug 04 2023

Keywords

Examples

			The subset {1,2,4,5,10,14} has differences (1,2,1,5,4) so is counted under a(14).
The a(0) = 1 through a(5) = 14 subsets:
  {}  {}   {}     {}       {}         {}
      {1}  {1}    {1}      {1}        {1}
           {2}    {2}      {2}        {2}
           {1,2}  {3}      {3}        {3}
                  {1,2}    {4}        {4}
                  {1,2,3}  {1,2}      {5}
                           {2,4}      {1,2}
                           {1,2,3}    {2,4}
                           {1,2,4}    {1,2,3}
                           {1,2,3,4}  {1,2,4}
                                      {1,2,3,4}
                                      {1,2,3,5}
                                      {1,2,4,5}
                                      {1,2,3,4,5}
		

Crossrefs

For differences of all strict pairs we have A054519, for partitions A007862.
For "disjoint" instead of "subset" we have A364463, partitions A363260.
For "non-disjoint" we have A364466, partitions A364467 (strict A364536).
The complement is counted by A364672, partitions A364673, A364674, A364675.
First differences of terms are A364752, complement A364753.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]], SubsetQ[#,Differences[#]]&]], {n,0,10}]

Extensions

More terms from Rémy Sigrist, Aug 06 2023

A364672 Number of subsets of {1..n} not containing all of their own first differences.

Original entry on oeis.org

0, 0, 0, 2, 6, 18, 41, 94, 198, 416, 853, 1746, 3531, 7151, 14415, 29049, 58431, 117528, 236145, 474436, 952627, 1912494, 3838175, 7701540, 15449676, 30988137, 62142415, 124600422, 249795358, 500719994, 1003575768, 2011211100, 4030123185, 8074898552, 16177657763, 32408393211, 64917907623
Offset: 0

Views

Author

Gus Wiseman, Aug 05 2023

Keywords

Examples

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

Crossrefs

For disjunction instead of containment we have A364463, partitions A363260.
For overlap we have A364466, partitions A364467 (strict A364536).
The complement is counted by A364671, partitions A364673, A364674, A364675.
First differences of terms are A364753, complement A364752.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],!SubsetQ[#,Differences[#]]&]],{n,0,10}]

Formula

a(n) = 2^n - A364671(n). - Andrew Howroyd, Jan 27 2024

Extensions

a(21) onwards (using A364671) added by Andrew Howroyd, Jan 27 2024

A364752 Number of subsets of {1..n} containing n and all first differences.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 9, 11, 24, 38, 75, 131, 263, 476, 928, 1750, 3386, 6439, 12455, 23853, 46097, 88709, 171471, 330939, 640472, 1238755, 2400154, 4650857, 9022792, 17510820, 34015138, 66106492, 128571563, 250191929, 487175381, 949133736, 1850223956, 3608650389
Offset: 0

Views

Author

Gus Wiseman, Aug 06 2023

Keywords

Examples

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

Crossrefs

Partial sums are A364671, complement A364672.
The complement is counted by A364753.
A054519 counts subsets containing differences, A326083 containing sums.
A364463 counts subsets disjoint from differences, complement A364466.
A364673 counts partitions containing differences, A364674, A364675.

Programs

  • Mathematica
    Table[If[n==0,1,Length[Select[Subsets[Range[n]], MemberQ[#,n]&&SubsetQ[#,Differences[#]]&]]],{n,0,10}]

Extensions

More terms from Rémy Sigrist, Aug 06 2023

A364753 Number of subsets of {1..n} containing n but not containing all first differences.

Original entry on oeis.org

0, 0, 0, 2, 4, 12, 23, 53, 104, 218, 437, 893, 1785, 3620, 7264, 14634, 29382, 59097, 118617, 238291, 478191, 959867, 1925681, 3863365, 7748136, 15538461, 31154278, 62458007, 125194936, 250924636, 502855774, 1007635332, 2018912085, 4044775367, 8102759211, 16230735448, 32509514412, 65110826347
Offset: 0

Views

Author

Gus Wiseman, Aug 06 2023

Keywords

Comments

In other words, subsets containing both n and some element that is not the difference of two consecutive elements.

Examples

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

Crossrefs

Partial sums are A364672, complement A364671.
The complement is counted by A364752.
A054519 counts subsets containing differences, A326083 containing sums.
A364463 counts subsets disjoint from differences, complement A364466.
A364673, A364674, A364675 count partitions containing differences.

Programs

  • Mathematica
    Table[Length[Select[Subsets[Range[n]],MemberQ[#,n]&&!SubsetQ[#,Differences[#]]&]],{n,0,10}]

Extensions

More terms from Giorgos Kalogeropoulos, Aug 07 2023
Showing 1-5 of 5 results.