
EXAMPLE

Some examples of list S and allocated values of dir if n = 4:
Length(S) = (4+1)*4 = 20.
S: L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L,L
dir: 1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0,1,2,3,0
S: L,L,L,L,R,L,R,R,L,R,R,R,L,R,L,L,R,L,L,L
dir: 1,2,3,0,0,0,0,3,3,3,2,1,1,1,1,2,2,2,3,0
S: L,L,R,L,L,L,L,R,R,L,R,R,L,R,L,L,L,L,R,R
dir: 1,2,2,2,3,0,1,1,0,0,0,3,3,3,3,0,1,2,2,1
Each value of dir occurs 20/4 = 5 times.


PROG

(Sage) from mpmath import *
def A198256(n) : return hyper([1n, 1n, 1n, 1n], [3, 3, 3], 1)*(n^4n^6)/4 + hyper([n, n, n, n], [2, 2, 2], 1)*(1+n+n^2+n^3) + hyper([2, 1n, 1n, 1n, 1n], [1, 3, 3, 3], 1)*(n^4+n^5)/4
mp.dps = 32
for n in (0..19) : print A198256(n) ## Peter Luschny, Oct 24 2011
(PARI)
A198256(n) = {sum(k=0, n, if(n == 1+2*k, 4, (1+k)*(1((nk)/(1+k))^4)/(1+2*kn))*binomial(n, k)^4)} \\ Peter Luschny, Nov 24 2011
