OFFSET
1,7
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000
HoKyu Lee, Double perfect partitions, Discrete Math., 306 (2006), 519-525.
FORMULA
a(1)=0; a(n)=1 for n=2..5; a(n) = Sum_{m=2..n-1, m-1|n-1} a(m) for n >= 6.
MAPLE
f:=proc(n) option remember; local t1, m, nm1, mm1; nm1:=n-1; if n <= 1 then RETURN(0); elif n <= 5 then RETURN(1); else t1:=0; for m from 2 to n-1 do mm1:=m-1; if nm1 mod mm1 = 0 then t1:=t1+f(m); fi; od; RETURN(t1); fi; end;
# second Maple program:
with(numtheory):
a:= proc(n) option remember; `if`(n<6, [0, 1$4][n],
add(a(k+1), k=divisors(n-1) minus {n-1}))
end:
seq(a(n), n=1..100); # Alois P. Heinz, Jul 09 2015
MATHEMATICA
a[n_] := a[n] = If[n<6, {0, 1, 1, 1, 1}[[n]], Sum[a[k+1], {k, Divisors[n-1] ~Complement~ {n-1}}]]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jul 15 2015, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Apr 07 2006
STATUS
approved