OFFSET
0,4
COMMENTS
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
FORMULA
a(n) = f(n,n,1) with f(n,m,k) = if k<=m then f(n,m,k+2)+f(n,m-k,k)*0^(n mod k) else 0^m.
MAPLE
with(numtheory):
a:= proc(n) option remember; local b, l; l, b:= sort(
[select(x-> is(x:: odd), divisors(n))[]]),
proc(m, i) option remember; `if`(m=0, 1, `if`(i<1, 0,
b(m, i-1)+`if`(l[i]>m, 0, b(m-l[i], i))))
end; b(n, nops(l))
end:
seq(a(n), n=0..100); # Alois P. Heinz, Mar 30 2017
MATHEMATICA
a[0] = 1; a[n_] := a[n] = Module[{b, l}, l = Select[Divisors[n], OddQ]; b[m_, i_] := b[m, i] = If[m == 0, 1, If[i < 1, 0, b[m, i-1] + If[l[[i]] > m, 0, b[m - l[[i]], i]]]]; b[n, Length[l]]];
Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Apr 11 2017, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Dec 11 2009
STATUS
approved