OFFSET
1,4
COMMENTS
Number of compositions (ordered partitions) of n into distinct odd parts, where every odd part between the largest and smallest appears.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10000
FORMULA
From Antti Karttunen, Dec 15 2021: (Start)
a(n) = Sum_{d|n, d <= n/d, and both d and n/d are of the same parity as n} d!.
a(2n-1) = A332031(2n-1) for all n >= 1.
(End)
EXAMPLE
a(9) = 7 because we have [9], [5, 3, 1], [5, 1, 3], [3, 5, 1], [3, 1, 5], [1, 5, 3] and [1, 3, 5].
a(12) = 2 because we have [7, 5], and [5, 7]. - Antti Karttunen, Dec 15 2021
MATHEMATICA
nmax = 75; CoefficientList[Series[Sum[k! x^(k^2)/(1 - x^(2 k)), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
PROG
(PARI) A332032(n) = sumdiv(n, d, if(!((n+d)%2) && !((n+(n/d))%2) && (d<=(n/d)), d!, 0)); \\ Antti Karttunen, Dec 15 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 05 2020
STATUS
approved