OFFSET
0,2
COMMENTS
We set A096586(0) = 0.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
EXAMPLE
a(5) = 2*43 = 86 because:
11 -> 2, 111 -> 12, 12 -> 3, 1111 -> 112, 112 -> 13, 112 -> 22,
13 -> 22, 13 -> 4, 11111 -> 1112, 1112 -> 122, 1112 -> 113, 122 -> 23,
122 -> 113, 113 -> 23, 113 -> 14, 23 -> 14, 14 -> 5,
0 -> 1,
1 -> 11, 1 -> 2, 11 -> 111, 11 -> 12, 2 -> 12, 2 -> 3, 111 -> 1111,
111 -> 112, 12 -> 112, 12 -> 13, 12 -> 22, 3 -> 13, 3 -> 4,
1111 -> 11111, 1111 -> 1112, 112 -> 1112, 112 -> 113, 112 -> 122,
13 -> 113, 13 -> 14, 13 -> 23, 22 -> 23, 22 -> 122, 4 -> 14, 4 -> 5,
which gives 43 transitions and (counting upwards and downwards transitions) we have 2*43 = 86 = A096586(5).
MATHEMATICA
(* first do *) Needs["DiscreteMath`Combinatorica`"] (* then *) a[0] = 0; a[n_] := Block[{p = Partitions[n + 1], l = PartitionsP[n + 1]}, Sum[ Length[ Union[ p[[k]] ]]^2 - Length[ Union[ p[[k]] ]], {k, l}]]; b = CoefficientList[ Series[1/(1 - x)*Product[1/(1 - x^k), {k, 75}], {x, 0, 45}], x]; f[n_] := Sum[a[k] + 2b[[k]], {k, n}] - 1; Table[ f[n], {n, 36}] (* Robert G. Wilson v, Jul 13 2004 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Thomas Wieder, Jul 02 2004
EXTENSIONS
More terms from Robert G. Wilson v, Jul 13 2004
STATUS
approved