OFFSET
0,4
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..10000
EXAMPLE
a(9) = 4 : [9], [8,1], [6,3], [6,2,1].
a(15) = 6 : [15], [14,1], [12,3], [12,2,1], [10,5], [8,4,2,1].
MAPLE
A122651r := proc(n, pmax, dv) option remember ; local a, d ; a := 0 ; for d in dv do if d = n and d <= pmax then a := a+1 ; elif d < pmax and n-d > 0 then a := a+A122651r(n-d, d-1, numtheory[divisors](d) minus {d} ) ; fi; od: a ; end: A122651 := proc(n) local i; A122651r(n, n, convert([seq(i, i=1..n)], set) ) ; end: for n from 1 to 120 do printf("%d, ", A122651(n)) ; od: # R. J. Mathar, May 22 2009
# second Maple program:
with(numtheory):
b:= proc(n) option remember;
`if`(n=0, 1, add(b((n-d)/d), d=divisors(n) minus{1}))
end:
a:= n-> `if`(n=0, 1, b(n)+b(n-1));
seq(a(n), n=0..200); # Alois P. Heinz, Mar 28 2011
MATHEMATICA
b[0] = 1; b[n_] := b[n] = Sum[b[(n - d)/d], {d, Divisors[n] // Rest}]; a[0] = 1; a[n_] := b[n] + b[n-1]; Table[a[n], {n, 0, 84}] (* Jean-François Alcover, Mar 26 2013, after Alois P. Heinz *)
PROG
(PARI) { a(n, m=0) = local(r=0); if(n==0, return(1)); fordiv(n, d, if(d<=m, next); r+=a((n-d)\d, 1); ); r } /* Max Alekseyev */
CROSSREFS
KEYWORD
nonn,look
AUTHOR
EXTENSIONS
More terms from R. J. Mathar, May 22 2009
a(0)=1 prepended by Max Alekseyev, Nov 13 2009
STATUS
approved