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 10 results.

A143823 Number of subsets {x(1),x(2),...,x(k)} of {1,2,...,n} such that all differences |x(i)-x(j)| are distinct.

Original entry on oeis.org

1, 2, 4, 7, 13, 22, 36, 57, 91, 140, 216, 317, 463, 668, 962, 1359, 1919, 2666, 3694, 5035, 6845, 9188, 12366, 16417, 21787, 28708, 37722, 49083, 63921, 82640, 106722, 136675, 174895, 222558, 283108, 357727, 451575, 567536, 712856, 890405, 1112081, 1382416, 1717540
Offset: 0

Views

Author

John W. Layman, Sep 02 2008

Keywords

Comments

When the set {x(1),x(2),...,x(k)} satisfies the property that all differences |x(i)-x(j)| are distinct (or alternately, all the sums are distinct), then it is called a Sidon set. So this sequence is basically the number of Sidon subsets of {1,2,...,n}. - Sayan Dutta, Feb 15 2024
See A143824 for sizes of the largest subsets of {1,2,...,n} with the desired property.
Also the number of subsets of {1..n} such that every orderless pair of (not necessarily distinct) elements has a different sum. - Gus Wiseman, Jun 07 2019

Examples

			{1,2,4} is a subset of {1,2,3,4}, with distinct differences 2-1=1, 4-1=3, 4-2=2 between pairs of elements, so {1,2,4} is counted as one of the 13 subsets of {1,2,3,4} with the desired property.  Only 2^4-13=3 subsets of {1,2,3,4} do not have this property: {1,2,3}, {2,3,4}, {1,2,3,4}.
From _Gus Wiseman_, May 17 2019: (Start)
The a(0) = 1 through a(5) = 22 subsets:
  {}  {}   {}     {}     {}       {}
      {1}  {1}    {1}    {1}      {1}
           {2}    {2}    {2}      {2}
           {1,2}  {3}    {3}      {3}
                  {1,2}  {4}      {4}
                  {1,3}  {1,2}    {5}
                  {2,3}  {1,3}    {1,2}
                         {1,4}    {1,3}
                         {2,3}    {1,4}
                         {2,4}    {1,5}
                         {3,4}    {2,3}
                         {1,2,4}  {2,4}
                         {1,3,4}  {2,5}
                                  {3,4}
                                  {3,5}
                                  {4,5}
                                  {1,2,4}
                                  {1,2,5}
                                  {1,3,4}
                                  {1,4,5}
                                  {2,3,5}
                                  {2,4,5}
(End)
		

Crossrefs

First differences are A308251.
Second differences are A169942.
Row sums of A381476.
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

  • Maple
    b:= proc(n, s) local sn, m;
          if n<1 then 1
        else sn:= [s[], n];
             m:= nops(sn);
             `if`(m*(m-1)/2 = nops(({seq(seq(sn[i]-sn[j],
               j=i+1..m), i=1..m-1)})), b(n-1, sn), 0) +b(n-1, s)
          fi
        end:
    a:= proc(n) option remember;
           b(n-1, [n]) +`if`(n=0, 0, a(n-1))
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Sep 14 2011
  • Mathematica
    b[n_, s_] := Module[{ sn, m}, If[n<1, 1, sn = Append[s, n]; m = Length[sn]; If[m*(m-1)/2 == Length[Table[sn[[i]] - sn[[j]], {i, 1, m-1}, {j, i+1, m}] // Flatten // Union], b[n-1, sn], 0] + b[n-1, s]]]; a[n_] := a[n] = b[n - 1, {n}] + If[n == 0, 0, a[n-1]]; Table [a[n], {n, 0, 30}] (* Jean-François Alcover, Nov 08 2015, after Alois P. Heinz *)
    Table[Length[Select[Subsets[Range[n]],UnsameQ@@Abs[Subtract@@@Subsets[#,{2}]]&]],{n,0,15}] (* Gus Wiseman, May 17 2019 *)
  • Python
    from itertools import combinations
    def is_sidon_set(s):
        allsums = []
        for i in range(len(s)):
            for j in range(i, len(s)):
                allsums.append(s[i] + s[j])
        if len(allsums)==len(set(allsums)):
            return True
        return False
    def a(n):
        sidon_count = 0
        for r in range(n + 1):
            subsets = combinations(range(1, n + 1), r)
            for subset in subsets:
                if is_sidon_set(subset):
                    sidon_count += 1
        return sidon_count
    print([a(n) for n in range(20)]) # Sayan Dutta, Feb 15 2024
    
  • Python
    from functools import cache
    def b(n, s):
        if n < 1: return 1
        sn = s + [n]
        m = len(sn)
        return (b(n-1, sn) if m*(m-1)//2 == len(set(sn[i]-sn[j] for i in range(m-1) for j in range(i+1, m))) else 0) + b(n-1, s)
    @cache
    def a(n): return b(n-1, [n]) + (0 if n==0 else a(n-1))
    print([a(n) for n in range(31)]) # Michael S. Branicky, Feb 15 2024 after Alois P. Heinz

Formula

a(n) = A169947(n-1) + n + 1 for n>=2. - Nathaniel Johnston, Nov 12 2010
a(n) = A054578(n) + 1 for n>0. - Alois P. Heinz, Jan 17 2013

Extensions

a(21)-a(29) from Nathaniel Johnston, Nov 12 2010
Corrected a(21)-a(29) and more terms from Alois P. Heinz, Sep 14 2011

A325858 Number of Golomb partitions of n.

Original entry on oeis.org

1, 1, 2, 3, 5, 7, 10, 14, 20, 25, 36, 47, 59, 78, 99, 122, 155, 195, 232, 295, 355, 432, 522, 641, 749, 919, 1076, 1283, 1506, 1802, 2067, 2470, 2835, 3322, 3815, 4496, 5070, 5959, 6736, 7807, 8849, 10266, 11499, 13326, 14928, 17140, 19193, 22037, 24519, 28106
Offset: 0

Views

Author

Gus Wiseman, Jun 02 2019

Keywords

Comments

We define a Golomb partition of n to be an integer partition of n such that every pair of distinct parts has a different difference.
Also the number of integer partitions of n such that every orderless pair of (not necessarily distinct) parts has a different sum.
The strict case is A325876.

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)   (411)     (331)
                            (11111)  (2211)    (421)
                                     (3111)    (511)
                                     (21111)   (2221)
                                     (111111)  (4111)
                                               (22111)
                                               (31111)
                                               (211111)
                                               (1111111)
The A000041(9) - a(9) = 5 non-Golomb partitions of 9 are: (531), (432), (3321), (32211), (321111).
		

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
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@Subtract@@@Subsets[Union[#],{2}]&]],{n,0,30}]

A325879 Number of maximal subsets of {1..n} such that every ordered pair of distinct elements has a different difference.

Original entry on oeis.org

1, 1, 1, 3, 3, 6, 14, 20, 24, 36, 64, 110, 176, 238, 294, 370, 504, 736, 1086, 1592, 2240, 2982, 3788, 4700, 5814, 7322, 9396, 12336, 16552, 22192, 29310, 38046, 48368, 60078, 73722, 89416, 108208, 131310, 160624, 198002, 247408, 310410, 390924, 490818, 613344, 758518
Offset: 0

Views

Author

Gus Wiseman, Jun 02 2019

Keywords

Comments

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

Examples

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

Crossrefs

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

Programs

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

Extensions

a(21)-a(45) from Fausto A. C. Cariboni, Feb 08 2022

A325876 Number of strict Golomb partitions of n.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 3, 5, 6, 6, 9, 11, 10, 15, 17, 18, 24, 29, 27, 38, 43, 47, 53, 67, 67, 84, 87, 102, 113, 137, 131, 167, 179, 204, 213, 261, 263, 315, 327, 377, 413, 476, 472, 564, 602, 677, 707, 820, 845, 969, 1027, 1131, 1213, 1364, 1413, 1596, 1700, 1858
Offset: 0

Views

Author

Gus Wiseman, Jun 02 2019

Keywords

Comments

We define a Golomb partition of n to be an integer partition of n such that every ordered pair of distinct parts has a different difference.
Also the number of strict integer partitions of n such that every orderless pair of (not necessarily distinct) parts has a different sum.
The non-strict case is A325858.

Examples

			The a(2) = 1 through a(11) = 11 partitions (A = 10, B = 11):
  (2)  (3)   (4)   (5)   (6)   (7)    (8)    (9)    (A)    (B)
       (21)  (31)  (32)  (42)  (43)   (53)   (54)   (64)   (65)
                   (41)  (51)  (52)   (62)   (63)   (73)   (74)
                               (61)   (71)   (72)   (82)   (83)
                               (421)  (431)  (81)   (91)   (92)
                                      (521)  (621)  (532)  (A1)
                                                    (541)  (542)
                                                    (631)  (632)
                                                    (721)  (641)
                                                           (731)
                                                           (821)
		

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
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&UnsameQ@@Subtract@@@Subsets[Union[#],{2}]&]],{n,0,30}]
  • Python
    from collections import Counter
    from itertools import combinations
    from sympy.utilities.iterables import partitions
    def A325876(n): return sum(1 for p in partitions(n) if max(list(Counter(abs(d[0]-d[1]) for d in combinations(list(Counter(p).elements()),2)).values()),default=1)==1)-(n&1^1) if n else 1 # Chai Wah Wu, Sep 17 2023

A325880 Number of maximal subsets of {1..n} containing n such that every ordered pair of distinct elements has a different difference.

Original entry on oeis.org

1, 1, 2, 2, 4, 8, 8, 10, 18, 34, 50, 70, 78, 89, 120, 181, 277, 401, 561, 728, 867, 1031, 1219, 1537, 2013, 2684, 3581, 4973, 6435, 8124, 9974, 12054, 14057, 16890, 19783, 24102, 29539, 37247, 46301, 59825, 74556, 94064, 115057, 141068, 167521, 200790, 232798, 273734
Offset: 1

Views

Author

Gus Wiseman, Jun 02 2019

Keywords

Comments

Also the number of maximal subsets of {1..n} containing n such that every orderless pair of (not necessarily distinct) elements has a different sum.

Examples

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

Crossrefs

Programs

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

Extensions

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

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

Original entry on oeis.org

210, 420, 462, 630, 840, 858, 910, 924, 1050, 1155, 1260, 1326, 1386, 1470, 1680, 1716, 1820, 1848, 1870, 1890, 1938, 2100, 2145, 2310, 2470, 2520, 2574, 2622, 2652, 2730, 2772, 2926, 2940, 3150, 3234, 3315, 3360, 3432, 3465, 3570, 3640, 3696, 3740, 3780, 3876
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:
   210: {1,2,3,4}
   420: {1,1,2,3,4}
   462: {1,2,4,5}
   630: {1,2,2,3,4}
   840: {1,1,1,2,3,4}
   858: {1,2,5,6}
   910: {1,3,4,6}
   924: {1,1,2,4,5}
  1050: {1,2,3,3,4}
  1155: {2,3,4,5}
  1260: {1,1,2,2,3,4}
  1326: {1,2,6,7}
  1386: {1,2,2,4,5}
  1470: {1,2,3,4,4}
  1680: {1,1,1,1,2,3,4}
  1716: {1,1,2,5,6}
  1820: {1,1,3,4,6}
  1848: {1,1,1,2,4,5}
  1870: {1,3,5,7}
  1890: {1,2,2,2,3,4}
		

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
    Select[Range[1000],!UnsameQ@@Plus@@@Subsets[PrimePi/@First/@FactorInteger[#],{2}]&]

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}]&]

A384009 Irregular triangle read by rows where row n lists the positive first differences of the prime indices of n.

Original entry on oeis.org

1, 2, 1, 3, 1, 1, 2, 2, 4, 1, 5, 3, 1, 1, 3, 6, 1, 1, 7, 4, 2, 1, 2, 4, 1, 8, 1, 2, 5, 5, 1, 2, 3, 6, 9, 1, 1, 10, 2, 3, 1, 3, 6, 7, 2, 1, 1, 11, 1, 7, 1, 1, 4, 2, 12, 1, 2, 4, 13, 8, 4, 1, 1, 2, 8, 9, 14, 5, 1, 3, 3, 2, 1, 5, 5, 1, 1, 15, 1, 2, 2, 10, 3, 1, 6, 6
Offset: 1

Views

Author

Gus Wiseman, May 23 2025

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 60 are {1,1,2,3}, differences (0,1,1), positive (1,1).
Rows begin:
     1: ()     16: ()       31: ()       46: (8)
     2: ()     17: ()       32: ()       47: ()
     3: ()     18: (1)      33: (3)      48: (1)
     4: ()     19: ()       34: (6)      49: ()
     5: ()     20: (2)      35: (1)      50: (2)
     6: (1)    21: (2)      36: (1)      51: (5)
     7: ()     22: (4)      37: ()       52: (5)
     8: ()     23: ()       38: (7)      53: ()
     9: ()     24: (1)      39: (4)      54: (1)
    10: (2)    25: ()       40: (2)      55: (2)
    11: ()     26: (5)      41: ()       56: (3)
    12: (1)    27: ()       42: (1,2)    57: (6)
    13: ()     28: (3)      43: ()       58: (9)
    14: (3)    29: ()       44: (4)      59: ()
    15: (1)    30: (1,1)    45: (1)      60: (1,1)
		

Crossrefs

Row-lengths are A001221(n) - 1, sums A243055.
For multiplicities instead of differences we have A124010 (prime signature).
Positions of non-strict rows are a subset of A325992.
Including difference 0 gives A355536, 0-prepended A287352.
The 0-prepended version is A383534.
A000040 lists the primes, differences A001223.
A056239 adds up prime indices, row sums of A112798, counted by A001222.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[DeleteCases[Differences[prix[n]],0],{n,100}]

A385814 Triangle read by rows where T(n,k) is the number of integer partitions of n with k maximal proper anti-runs (sequences decreasing by more than 1).

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 2, 1, 1, 1, 0, 2, 2, 1, 1, 1, 0, 3, 2, 3, 1, 1, 1, 0, 3, 4, 2, 3, 1, 1, 1, 0, 4, 5, 4, 3, 3, 1, 1, 1, 0, 5, 5, 6, 5, 3, 3, 1, 1, 1, 0, 6, 8, 7, 6, 6, 3, 3, 1, 1, 1, 0, 7, 9, 10, 8, 7, 6, 3, 3, 1, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Jul 09 2025

Keywords

Examples

			The partition (8,5,4,2,1) has maximal proper anti-runs ((8,5),(4,2),(1)) so is counted under T(20,3).
The partition (8,5,3,2,2) has maximal proper anti-runs ((8,5,3),(2),(2)) so is also counted under T(20,3).
Row n = 8 counts the following partitions:
  .  8   611  5111  41111  32111   221111  2111111  11111111
     71  521  4211  3221   311111
     62  44   332   2222   22211
     53  431  3311
         422
Triangle begins:
  1
  0  1
  0  1  1
  0  1  1  1
  0  2  1  1  1
  0  2  2  1  1  1
  0  3  2  3  1  1  1
  0  3  4  2  3  1  1  1
  0  4  5  4  3  3  1  1  1
  0  5  5  6  5  3  3  1  1  1
  0  6  8  7  6  6  3  3  1  1  1
  0  7  9 10  8  7  6  3  3  1  1  1
  0  9 11 13 12  9  8  6  3  3  1  1  1
  0 10 14 16 15 13 10  8  6  3  3  1  1  1
  0 12 19 18 21 17 14 11  8  6  3  3  1  1  1
  0 14 21 26 23 24 19 15 11  8  6  3  3  1  1  1
  0 17 26 31 33 28 26 20 16 11  8  6  3  3  1  1  1
  0 19 32 37 40 39 31 28 21 16 11  8  6  3  3  1  1  1
  0 23 38 47 50 47 45 34 29 22 16 11  8  6  3  3  1  1  1
  0 26 45 57 61 61 54 48 36 30 22 16 11  8  6  3  3  1  1  1
  0 31 53 71 75 76 70 60 51 37 31 22 16 11  8  6  3  3  1  1  1
		

Crossrefs

Row sums are A000041, strict A000009.
Column k = 1 is A003114.
For anti-runs instead of proper anti-runs we have A268193.
The corresponding rank statistic is A356228.
For proper runs instead of proper anti-runs we have A384881.
For subsets instead of partitions we have A384893, runs A034839.
The strict case is A384905.
For runs instead of proper anti-runs we have A385815.
A007690 counts partitions with no singletons (ranks A001694), complement A183558.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.
A047993 counts partitions with max part = length, ranks A106529.
A098859 counts Wilf partitions, complement A336866 (ranks A325992).
A116608 counts partitions by distinct parts.
A116931 counts sparse partitions, ranks A319630.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Length[Split[#,#1>#2+1&]]==k&]],{n,0,10},{k,0,n}]

A385815 Triangle read by rows where T(n,k) is the number of integer partitions of n with k maximal runs of consecutive elements decreasing by 0 or 1.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 0, 3, 0, 0, 0, 4, 1, 0, 0, 0, 5, 2, 0, 0, 0, 0, 7, 4, 0, 0, 0, 0, 0, 8, 7, 0, 0, 0, 0, 0, 0, 10, 12, 0, 0, 0, 0, 0, 0, 0, 13, 16, 1, 0, 0, 0, 0, 0, 0, 0, 15, 25, 2, 0, 0, 0, 0, 0, 0, 0, 0, 18, 34, 4, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Gus Wiseman, Jul 09 2025

Keywords

Examples

			The partition (8,5,4,2,1) has maximal runs ((8),(5,4),(2,1)) so is counted under T(20,3).
The partition (8,5,3,2,2) has maximal runs ((8),(5),(3,2,2)) so is also counted under T(20,3).
Row n = 9 counts the following partitions:
  (9)                  (6,3)            (5,3,1)
  (5,4)                (7,2)
  (3,3,3)              (8,1)
  (4,3,2)              (4,4,1)
  (3,2,2,2)            (5,2,2)
  (3,3,2,1)            (6,2,1)
  (2,2,2,2,1)          (7,1,1)
  (3,2,2,1,1)          (4,2,2,1)
  (2,2,2,1,1,1)        (4,3,1,1)
  (3,2,1,1,1,1)        (5,2,1,1)
  (2,2,1,1,1,1,1)      (6,1,1,1)
  (2,1,1,1,1,1,1,1)    (3,3,1,1,1)
  (1,1,1,1,1,1,1,1,1)  (4,2,1,1,1)
                       (5,1,1,1,1)
                       (4,1,1,1,1,1)
                       (3,1,1,1,1,1,1)
Triangle begins:
   1
   0   1
   0   2   0
   0   3   0   0
   0   4   1   0   0
   0   5   2   0   0   0
   0   7   4   0   0   0   0
   0   8   7   0   0   0   0   0
   0  10  12   0   0   0   0   0   0
   0  13  16   1   0   0   0   0   0   0
   0  15  25   2   0   0   0   0   0   0   0
   0  18  34   4   0   0   0   0   0   0   0   0
   0  23  46   8   0   0   0   0   0   0   0   0   0
   0  26  62  13   0   0   0   0   0   0   0   0   0   0
   0  31  82  22   0   0   0   0   0   0   0   0   0   0   0
		

Crossrefs

Row sums are A000041, strict A000009.
Column k = 1 is A034296 (flat or gapless partitions, ranks A066311 or A073491).
For subsets instead of partitions we have A034839, anti-runs A384893.
The strict case appears to be A116674.
For anti-runs instead of runs we have A268193.
The corresponding rank statistic is A287170.
For proper runs instead of runs we have A384881.
For proper anti-runs instead of runs we have A385814.
A007690 counts partitions with no singletons (ranks A001694), complement A183558.
A047993 counts partitions with max part = length, rank A106529.
A098859 counts Wilf partitions, complement A336866 (ranks A325992).
A116608 counts partitions by distinct parts.
A116931 counts sparse partitions, ranks A319630.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Length[Split[#,#1<=#2+1&]]==k&]],{n,0,20},{k,0,n}]
Showing 1-10 of 10 results.