OFFSET
1,6
COMMENTS
a(n+1) is the sum of the smaller parts in the partitions of n into two parts with the larger part odd. For example, a(11) = 9; the partitions of 10 into two parts are (9,1), (8,2), (7,3), (6,4) and (5,5). Three of these partitions have an odd number as their larger part, namely (9,1), (7,3) and (5,5). Adding the smaller parts of these partitions gives 1 + 3 + 5 = 9.
FORMULA
a(n) = Sum_{i=1..floor((n-1)/2)} i * ((n-i+1) mod 2).
Conjectures from Colin Barker, Dec 06 2017: (Start)
G.f.: x^3*(1 - x + x^2 + x^3) / ((1 - x)^3*(1 + x)^2*(1 + x^2)^2).
a(n) = a(n-1) + 2*a(n-4) - 2*a(n-5) - a(n-8) + a(n-9) for n > 9.
(End)
a(n) = floor((n+1)/4)^2*(n mod 2)+(1+floor((n-2)/4))*floor((n-2)/4)*((n+1) mod 2). - Wesley Ivan Hurt, Dec 08 2017
EXAMPLE
a(10) = 6; the partitions of 10 into two parts are (9,1), (8,2), (7,3), (6,4) and (5,5). Two of these partitions have an even number as their larger part, namely (8,2) and (6,4). Adding the smaller parts of these partitions gives 2 + 4 = 6.
MATHEMATICA
Table[Sum[i Mod[n - i + 1, 2], {i, Floor[(n - 1)/2]}], {n, 80}]
PROG
(PARI) a(n) = sum(i=1, floor((n-1)/2), i*lift(Mod(n-i+1, 2))) \\ Iain Fox, Dec 06 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Dec 05 2017
STATUS
approved