OFFSET
0,4
COMMENTS
A polite number (A138591) has at least one partition of two or more consecutive positive integers that equals n. This sequence is the sum of lengths of all partitions that make a number polite.
This sequence is similar to A204217 which sums lengths of all partitions adding up to n including the partition of length 1.
LINKS
Wikipedia, Polite number
FORMULA
a(n) = A204217(n) - 1 for n >= 1, a(0) = 0.
EXAMPLE
n=15 is the sum of three partitions of n with two or more consecutive positive integers: 15 = 1 + 2 + 3 + 4 + 5, 15 = 4 + 5 + 6, 15 = 7 + 8.
The sum of the lengths of these partitions is a(15) = 5 + 3 + 2 = 10.
On the other hand a(8) = 0 because there are no partitions of two or more consecutive integers adding up to 8.
PROG
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Daniel Vik, Oct 06 2022
STATUS
approved