OFFSET
1,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..500
FORMULA
a(n) ~ 1/(2*sqrt(5)) * ((1+sqrt(5))/2)^(n-1). - Vaclav Kotesovec, May 01 2014
EXAMPLE
a(8) = 4: [2,2,2,2], [2,6], [4,4], [6,2].
MAPLE
b:= proc(n, t, g) option remember;
`if`(n=0, `if`(igcd(g, t)<>1, 1, 0),
add(b(n-i, t+1, min(i, g)), i=1..n))
end:
a:= n-> b(n, 0, infinity):
seq(a(n), n=1..50);
MATHEMATICA
b[n_, t_, g_] := b[n, t, g] = If[n == 0, If[GCD[g, t] != 1, 1, 0], Sum[b[n-i, t+1, Min[i, g]], {i, 1, n}]]; a[n_] := b[n, 0, Infinity]; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Nov 05 2014, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Nov 11 2011
STATUS
approved