OFFSET
0,7
LINKS
EXAMPLE
a(6) = 3 because we have [6], [4, 2] and [2, 4].
MAPLE
a:= proc(n) local b; b:=
proc(m, i, p) option remember; `if`(m=0, p!, `if`(i<1, 0,
b(m, i-1, p)+`if`(i>m or igcd(i, n)=1, 0, b(m-i, i-1, p+1))))
end; forget(b): b(n$2, 0)
end:
seq(a(n), n=0..63); # Alois P. Heinz, Feb 04 2020
MATHEMATICA
a[n_] := Module[{b}, b[m_, i_, p_] := b[m, i, p] = If[m == 0, p!, If[i < 1, 0, b[m, i - 1, p] + If[i > m || GCD[i, n] == 1, 0, b[m - i, i - 1, p + 1]]]]; b[n, n, 0]];
a /@ Range[0, 63] (* Jean-François Alcover, Nov 26 2020, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Feb 04 2020
STATUS
approved