OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..5000
FORMULA
G.f.: 1/(1 - Sum_{k>0} ( x^(k^2)/(1 - x^k + x^(k^2)) )). - John Tyler Rascoe, Oct 09 2025
EXAMPLE
The composition c = (1,1,3,3,3,2,2,1) has maximal runs ((1,1),(3,3,3),(2,2),(1)), which all satisfy length >= first, so c is counted under n = 16.
The a(1) = 1 through a(8) = 10 compositions:
(1) (11) (111) (22) (122) (222) (1222) (2222)
(1111) (221) (1122) (2221) (11222)
(11111) (1221) (11122) (12221)
(2211) (11221) (22211)
(111111) (12211) (111122)
(22111) (111221)
(1111111) (112211)
(122111)
(221111)
(11111111)
MAPLE
b:= proc(n, l) option remember; `if`(n=0, 1, add(
`if`(i=l, 0, add(b(n-i*j, i), j=i..n/i)), i=1..n))
end:
a:= n-> b(n, 0):
seq(a(n), n=0..43); # Alois P. Heinz, Dec 17 2025
MATHEMATICA
Table[Length[Select[Join@@Permutations/@IntegerPartitions[n], And@@Table[Length[k]>=First[k], {k, Split[#]}]&]], {n, 0, 15}]
PROG
(PARI)
A_x(N) = {Vec(1/(1 - sum(k=1, N/2, x^(k^2)/(1 - x^k + x^(k^2)))) + O('x^(N+1)))} \\ John Tyler Rascoe, Oct 09 2025
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 09 2025
EXTENSIONS
a(24) onwards from John Tyler Rascoe, Oct 09 2025
STATUS
approved
