Heigh-ho, still incomplete: trying again, the (conjectured) explicit formula is for p-q even, f(p, q, n) = 0; for p-q odd, f(p, q, n) = [2^(n-(p+q+3)/2)] for q <= n; = [2^(n-(p+q+1)/2)] for q = n+1,n+2, and p <> n-1; = 1 for p = n-1 and q = n+2. The recursion can be short-circuited to some extent by employing a less well-known "bottom-up" algorithm to transfer n discs from pin n to n+2: on odd moves, shift disc 0 to the next pin in cyclic order; on even moves 2i, make move i in the solution for n-1 discs, but with diameters p and q increased by 1. The cyclic order is rightwards for n even, leftwards for odd; and the even moves are the only shifts possible without moving (the smallest) disc 0 again. Hence the number of variables may be reduced from 3 to 2 via f(p, q, n) = f(p-1, q-1, n-1) = f(0, q-p, n-p); and as before, for n > 0, f(0, q, n) = 2 f(0, q, n-1) for 0 <= q <= n-1, q = n+1; the cases q = n-1, n+1 may be included above, since by f(0, q, n) = f(0, n, n-1) for q = n, n+2 we have f(p, n-1, n-1) = f(p, n+1, n-1) for n > 2. This leaves cases for 0 <= n <= 2 to be initialised by hand. Maple code is available to anybody who hasn't already dozed off ... WFL