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

A385572 Number of subsets of {1..n} with the same number of maximal runs (increasing by 1) as maximal anti-runs (increasing by more than 1).

Original entry on oeis.org

1, 2, 3, 4, 7, 12, 19, 34, 63, 112, 207, 394, 739, 1398, 2687, 5152, 9891, 19128, 37039, 71754, 139459, 271522, 528999, 1032308, 2017291, 3945186, 7723203, 15134440, 29679407, 58245068, 114389683, 224796210, 442021743, 869658304, 1711914351, 3371515306
Offset: 0

Views

Author

Gus Wiseman, Jul 04 2025

Keywords

Comments

Also the number of subsets of {1..n} with the same number of adjacent elements increasing by 1 as adjacent elements increasing by more than 1.

Examples

			The set {2,3,5,6,8} has maximal runs ((2,3),(5,6),(8)) and maximal anti-runs ((2),(3,5),(6,8)) so is counted under a(8).
The a(0) = 1 through a(6) = 19 subsets:
  {}  {}   {}   {}   {}       {}       {}
      {1}  {1}  {1}  {1}      {1}      {1}
           {2}  {2}  {2}      {2}      {2}
                {3}  {3}      {3}      {3}
                     {4}      {4}      {4}
                     {1,2,4}  {5}      {5}
                     {1,3,4}  {1,2,4}  {6}
                              {1,2,5}  {1,2,4}
                              {1,3,4}  {1,2,5}
                              {1,4,5}  {1,2,6}
                              {2,3,5}  {1,3,4}
                              {2,4,5}  {1,4,5}
                                       {1,5,6}
                                       {2,3,5}
                                       {2,3,6}
                                       {2,4,5}
                                       {2,5,6}
                                       {3,4,6}
                                       {3,5,6}
		

Crossrefs

The LHS is counted by A034839 (for partitions A384881, strict A116674), rank statistic A069010.
The case containing n + 1 is A217615.
The RHS is counted by A384893 or A210034 (for partitions A268193, strict A384905), rank statistic A384890.
Subsets of this type are ranked by A385575.
A384175 counts subsets with all distinct lengths of maximal runs, complement A384176.
A384877 gives lengths of maximal anti-runs in binary indices, firsts A384878.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<5, [1, 2, 3, 4, 7][n+1], ((3*n-4)*a(n-1)-
          (3*n-5)*a(n-2)+(5*n-12)*a(n-3)-2*(4*n-11)*a(n-4)+4*(n-3)*a(n-5))/(n-1))
        end:
    seq(a(n), n=0..35);  # Alois P. Heinz, Jul 06 2025
  • Mathematica
    Table[Length[Select[Subsets[Range[n]],Length[Split[#,#2==#1+1&]]==Length[Split[#,#2!=#1+1&]]&]],{n,0,10}]
  • PARI
    a(n)=polcoef([1,1,1]*[x,0,0;x,x^2,1;0,x,x]^n*[1,0,0]~,n) \\ Christian Sievers, Jul 06 2025

Formula

Let M be the matrix [1,0,0; 1,x,1/x; 0,1,1]. Then a(n) is the sum of the constant terms of the entries in the left column of M^n. - Christian Sievers, Jul 06 2025

Extensions

a(21) and beyond from Christian Sievers, Jul 06 2025

A385574 Number of integer partitions of n with the same number of adjacent equal parts as adjacent unequal parts.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 2, 4, 5, 6, 10, 11, 13, 17, 20, 30, 36, 44, 55, 70, 86, 98, 128, 156, 190, 235, 288, 351, 409, 499, 603, 722, 863, 1025, 1227, 1461, 1757, 2061, 2444, 2892, 3406, 3996, 4708, 5497, 6430, 7595, 8835, 10294, 12027, 13971, 16252, 18887, 21878
Offset: 0

Views

Author

Gus Wiseman, Jul 04 2025

Keywords

Comments

These are also integer partitions of n with the same number of distinct parts as maximal anti-runs of parts.

Examples

			The partition (5,3,2,1,1,1,1) has 4 runs ((5),(3),(2),(1,1,1,1)) and 4 anti-runs ((5,3,2,1),(1),(1),(1)) so is counted under a(14).
The a(1) = 1 through a(10) = 10 reversed partitions (A = 10):
  (1)  (2)  (3)  (4)    (5)    (6)    (7)    (8)      (9)      (A)
                 (112)  (113)  (114)  (115)  (116)    (117)    (118)
                        (122)         (133)  (224)    (144)    (226)
                                      (223)  (233)    (225)    (244)
                                             (11123)  (11124)  (334)
                                                      (11223)  (11125)
                                                               (11134)
                                                               (11224)
                                                               (11233)
                                                               (12223)
		

Crossrefs

The RHS is counted by A116608, rank statistic A297155.
The LHS is counted by A133121, rank statistic A046660.
For related inequalities see A212165, A212168, A361204.
For subsets instead of partitions see A217615, A385572, A385575.
These partitions are ranked by A385576.
A000041 counts integer partitions, strict A000009.
A007690 counts partitions with no singletons, complement A183558.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.
A034839 counts subsets by number maximal runs, for partitions A384881, strict A116674.
A047993 counts partitions with max part = length (A106529).
A098859 counts Wilf partitions (complement A336866), compositions A242882.
A268193 counts partitions by maximal anti-runs, strict A384905, subsets A384893.
A355394 counts partitions with neighbors, complement A356236.

Programs

  • Mathematica
    Table[Length[Select[Reverse/@IntegerPartitions[n],Length[Union[#]]==Length[Split[#,#2!=#1&]]&]],{n,0,30}]
  • PARI
    lista(n)=Vec(polcoef((prod(i=1,n,1+x^i/(t*(1-t*x^i))+O(x*x^n))-1)*t+1,0,t)) \\ Christian Sievers, Jul 18 2025

Formula

For a partition p, let s(p) be its sum, e(p) the number of equal adjacent pairs, and d(p) the number of distinct adjacent pairs. Then Sum_{p partition} x^s(p) * t^(e(p)-d(p)) = (Product_{i>=1} (1 + x^i/(t*(1-t*x^i))) - 1) * t + 1, so a(n) is the coefficient of x^n*t^0 of this expression. - Christian Sievers, Jul 18 2025

A385576 Numbers whose prime indices have the same number of distinct elements as maximal anti-runs.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 12, 13, 17, 18, 19, 20, 23, 28, 29, 31, 37, 41, 43, 44, 45, 47, 50, 52, 53, 59, 61, 63, 67, 68, 71, 73, 75, 76, 79, 83, 89, 92, 97, 98, 99, 101, 103, 107, 109, 113, 116, 117, 120, 124, 127, 131, 137, 139, 147, 148, 149, 151, 153, 157, 163
Offset: 1

Views

Author

Gus Wiseman, Jul 04 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.
These are also numbers with the same number of adjacent equal prime indices as adjacent unequal prime indices.

Examples

			The prime indices of 2640 are {1,1,1,1,2,3,5}, with 4 distinct parts {1,2,3,5} and 4 maximal anti-runs ((1),(1),(1),(2,3,5)), so 2640 is in the sequence.
The terms together with their prime indices begin:
   1: {}
   2: {1}
   3: {2}
   5: {3}
   7: {4}
  11: {5}
  12: {1,1,2}
  13: {6}
  17: {7}
  18: {1,2,2}
  19: {8}
  20: {1,1,3}
  23: {9}
  28: {1,1,4}
  29: {10}
  31: {11}
  37: {12}
  41: {13}
  43: {14}
  44: {1,1,5}
  45: {2,2,3}
  47: {15}
		

Crossrefs

The LHS is the rank statistic A001221, triangle counted by A116608.
The RHS is the rank statistic A375136, triangle counted by A133121.
These partitions are counted by A385574.
A034296 counts flat or gapless partitions, ranks A066311 or A073491.
A047993 counts partitions with max part = length, ranks A106529.
A356235 counts partitions with a neighborless singleton, ranks A356237.
A384877 gives lengths of maximal anti-runs of binary indices, firsts A384878.
A384893 counts subsets by maximal anti-runs, for partitions A268193, strict A384905.
A385572 counts subsets with the same number of runs as anti-runs, ranks A385575.

Programs

  • Mathematica
    prix[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Select[Range[100],#==1||PrimeNu[#]==Length[Split[prix[#],UnsameQ]]&]

Formula

A001221(a(n)) = A375136(a(n)).
Showing 1-3 of 3 results.