login
A332032
G.f.: Sum_{k>=1} k! * x^(k^2) / (1 - x^(2*k)).
4
1, 0, 1, 2, 1, 0, 1, 2, 7, 0, 1, 2, 1, 0, 7, 26, 1, 0, 1, 2, 7, 0, 1, 26, 121, 0, 7, 2, 1, 0, 1, 26, 7, 0, 121, 722, 1, 0, 7, 26, 1, 0, 1, 2, 127, 0, 1, 746, 5041, 0, 7, 2, 1, 0, 121, 26, 7, 0, 1, 722, 1, 0, 5047, 40346, 121, 0, 1, 2, 7, 0, 1, 746, 1, 0, 127
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
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
Cf. A016825 (positions of 0's), A032021, A034178, A038548, A107461, A220400.
Coincides with A332031 on odd numbers.
Sequence in context: A074766 A138107 A089631 * A298878 A195982 A102761
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 05 2020
STATUS
approved