OFFSET
1,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
MAPLE
b:= proc(n, i) option remember; `if`(i<1, 0, `if`(irem(n, i, 'r')=0
and irem(r, 2)=1, 1, 0)+ add(b(n-i*j, i-1), j=0..n/i))
end:
a:= n-> b(n, n):
seq(a(n), n=1..50); # Alois P. Heinz, Feb 27 2013
MATHEMATICA
f[n_] := Block[{p = IntegerPartitions[n], l = PartitionsP[n], c = 0, k = 1}, While[k < l + 1, If[ OddQ[ Count[ p[[k]], p[[k]][[ -1]] ]], c++ ]; k++ ]; c]; Table[ f[n], {n, 50}] (* Robert G. Wilson v, Jul 23 2004 *)
b[n_, i_] := b[n, i] = If[i<1, 0, {q, r} = QuotientRemainder[n, i]; If[r == 0 && Mod[q, 2] == 1, 1, 0] + Sum[b[n - i*j, i-1], {j, 0, n/i}]] ; a[n_] := b[n, n]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Jan 24 2014, after Alois P. Heinz *)
Table[Count[Length[Split[#][[-1]]]&/@IntegerPartitions[n], _?(OddQ[#]&)], {n, 50}] (* Harvey P. Dale, May 29 2024 *)
PROG
(PARI) {q=sum(m=1, 100, (x^m/(1+x^m))/prod(i=m, 100, 1-x^i, 1+O(x^60)), 1+O(x^60)); for(n=1, 47, print1(polcoeff(q, n), ", "))} - Klaus Brockhaus, Jul 21 2004
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Vladeta Jovovic, Jul 19 2004
EXTENSIONS
Edited and extended by Robert G. Wilson v and Klaus Brockhaus, Jul 23 2004
STATUS
approved