OFFSET
1,3
EXAMPLE
The a(6) = 6 partitions of 6 to be counted are these:
[6] has alternating sum 6, which is a part,
[4,2] has alternating sum 4 - 2 = 2, a part,
[4,1,1] has alternating sum 4 - 1 + 1 = 4,
[3,2,1] has alternating sum 3 - 2 + 1 = 2,
[2,2,2] has alternating sum 2 - 2 + 1 = 2, and
[2,1,1,1,1] has alternating sum 2 - 1 + 1 - 1 + 1 - 1 = 2.
MATHEMATICA
Map[Count[Map[Apply[MemberQ, {#, Total[Map[
Total, {Take[##], Drop[##]} &[#, {1, -1, 2}] {1, -1}]]}] &,
IntegerPartitions[#]], True] &, Range[40]]
(* Peter J. C. Moses, May 25 2019 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jun 05 2019
STATUS
approved