login
A370929
Number of compositions of n with parts (p_1, ..., p_i) such that the set of adjacent differences is a subset of {-k,k} for some k > 0 and the number of parts equals ceiling(p_1/k).
1
1, 1, 1, 2, 2, 3, 4, 3, 5, 5, 7, 5, 9, 7, 7, 10, 11, 9, 13, 9, 13, 17, 11, 14, 19, 15, 13, 20, 19, 18, 23, 19, 20, 26, 21, 20, 32, 22, 25, 27, 33, 25, 37, 21, 34, 36, 35, 24, 50, 26, 40, 37, 44, 32, 51, 31, 48, 46, 49, 34, 65, 40, 45, 54, 56, 48, 63, 42, 58
OFFSET
0,4
LINKS
FORMULA
G.f.: 1 + Sum_{p>0} Sum_{k=1..p} x^(p*i) * Product_{j=1..i-1} (x^(-j*k) + x^(j*k)), where i = ceiling(p/k).
EXAMPLE
The compositions for n = 6 and n = 8 are:
6: [6], [5,1], [4,2], [3,2,1].
8: [8], [7,1], [6,2], [3,2,3], [3,5].
PROG
(PARI)
{ my(N=75, x='x+O('x^N));
my(gf= 1 + sum(p=1, N, sum(k=1, p, x^(p*ceil(p/k)) * prod(j=1, ceil(p/k)-1, (x^(-j*k) + x^(j*k))))));
Vec(gf) }
CROSSREFS
Compositions such that no adjacent parts are equal is A003242.
Compositions such that the set of adjacent differences is a subset of {-1,1} is A173258 and {-2,2} is A214254.
The array A214247 counts compositions such that the set of adjacent differences is a subset of {-k,k}.
Sequence in context: A091524 A026350 A205002 * A355029 A290735 A165634
KEYWORD
nonn,easy
AUTHOR
John Tyler Rascoe, Mar 06 2024
STATUS
approved