OFFSET
0,3
COMMENTS
Also the number of weakly alternating integer partitions of n, where we define a sequence to be weakly alternating if it is alternately weakly increasing and weakly decreasing, starting with either. This sequence looks at the somewhat degenerate case where no strict increases are allowed.
LINKS
John Tyler Rascoe, Table of n, a(n) for n = 0..300
FORMULA
G.f.: 1 + Sum_{i>0} (x^i/(1-x^i)) * (1 + Sum_{j>i} (x^j/(1-x^j)) / Product_{k=1..j-i-1} (1-x^(2*(i+k)))). - John Tyler Rascoe, Mar 20 2024
EXAMPLE
The a(1) = 1 through a(7) = 13 partitions:
(1) (2) (3) (4) (5) (6) (7)
(11) (21) (22) (32) (33) (43)
(111) (31) (41) (42) (52)
(211) (221) (51) (61)
(1111) (311) (222) (322)
(2111) (411) (331)
(11111) (2211) (511)
(3111) (2221)
(21111) (4111)
(111111) (22111)
(31111)
(211111)
(1111111)
MATHEMATICA
Table[Length[Select[IntegerPartitions[n], SameQ@@#||And@@EvenQ/@Take[Length/@Split[#], {2, -2}]&]], {n, 0, 30}]
PROG
(PARI)
A_x(N)={my(x='x+O('x^N), g= 1 + sum(i=1, N, (x^i/(1-x^i)) * (1 + sum(j=i+1, N-i, (x^j/((1-x^j))) / prod(k=1, j-i-1, 1-x^(2*(i+k)))))));
Vec(g)}
A_x(52) \\ John Tyler Rascoe, Mar 20 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Dec 06 2021
STATUS
approved