OFFSET
0,2
LINKS
Christian Sievers, Table of n, a(n) for n = 0..1000
FORMULA
G.f.: ( Sum_{i>=1} (1/(1-x^(2*i-1)/(1-x)^(i-1))-1) + 1-x ) / (1-x)^2. - Christian Sievers, Jun 21 2025
EXAMPLE
The subset {3,6,7,9,10,12} has maximal anti-runs ((3,6),(7,9),(10,12)), with lengths (2,2,2), so is counted under a(12).
The a(0) = 1 through a(4) = 14 subsets:
{} {} {} {} {}
{1} {1} {1} {1}
{2} {2} {2}
{1,2} {3} {3}
{1,2} {4}
{1,3} {1,2}
{2,3} {1,3}
{1,2,3} {1,4}
{2,3}
{2,4}
{3,4}
{1,2,3}
{2,3,4}
{1,2,3,4}
MATHEMATICA
Table[Length[Select[Subsets[Range[n]], SameQ@@Length/@Split[#, #2!=#1+1&]&]], {n, 0, 10}]
PROG
(PARI) lista(n)=Vec(sum(i=1, (n+1)\2, 1/(1-x^(2*i-1)/(1-x)^(i-1))-1, 1-x+O(x*x^n))/(1-x)^2) \\ Christian Sievers, Jun 20 2025
CROSSREFS
For partitions instead of subsets we have A384888.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Jun 18 2025
EXTENSIONS
a(21) and beyond from Christian Sievers, Jun 20 2025
STATUS
approved
