OFFSET
1,4
COMMENTS
Also number of partitions of n minus the number of odd divisors of n.
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
M. D. Hirschhorn and P. M. Hirschhorn, Partitions into Consecutive Parts, Mathematics Magazine: 2003, Volume 76, Number 4, Pages: 306-308.
EXAMPLE
For n = 6, the number of partitions of 6 is A000041(6) = 11. There are two partitions of 6 into (one or more) consecutive parts: [6] and [3, 2, 1], so a(6) = 11 - 2 = 9. On the other hand, 6 has two odd divisors: 1 and 3, so a(6) = 11 - 2 = 9.
For n = 15, the number of partitions of 15 is A000041(15) = 176. There are four partitions of 15 into (one or more) consecutive parts: [15], [8, 7], [6, 5, 4] and [5, 4, 3, 2, 1], so a(15) = 176 - 4 = 172. On the other hand, 15 has four odd divisors: 1, 3, 5 and 15, so a(15) = 176 - 4 = 172.
MAPLE
a:= n-> combinat[numbpart](n)-mul(`if`(i[1]=2, 1, i[2]+1), i=ifactors(n)[2]):
seq(a(n), n=1..100); # Alois P. Heinz, Feb 27 2020
MATHEMATICA
Table[PartitionsP@ n - DivisorSum[n, Boole[# > 0] &, OddQ@ # &], {n, 52}] (* Michael De Vlieger, Feb 27 2017 *)
PROG
(Sage)
A282467 = lambda n: number_of_partitions(n) - len(list(filter(is_odd, divisors(n))))
[A282467(n) for n in (1..52)] # Peter Luschny, Feb 28 2017
(PARI) a(n)=numbpart(n) - numdiv(n>>valuation(n, 2)) \\ Charles R Greathouse IV, Mar 01 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Omar E. Pol, Feb 25 2017
STATUS
approved