OFFSET
0,3
PROG
(PARI) {a(n, q=4)=local(M=matrix(n+1, n+1)); for(r=1, n+1, for(c=1, r, M[r, c]=if(r==c, 1, if(c>1, (M^q)[r-1, c-1])+(M^q)[r-1, c]))); return((M^n)[n+1, 1])}
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Oct 14 2005
STATUS
approved