

A125533


Number of n X n arrays with entries in 1..5 in which adjacent entries differ by 2 or less (adjacent means in x or y directions).


0




OFFSET

0,2


COMMENTS

[Empirical] a(base+1,n,diff)=a(base,n,diff)+F(n,diff) for base>=2.diff.(n1) and F(n,diff)= (n=2, A063496(diff+1)) (n=3, A068744(diff+1)) (n=4, A068745(diff+1)) (n=5, A068746(diff+1)) (n=6, A068747(diff+1))


LINKS

Table of n, a(n) for n=0..8.


PROG

(S/R) stvar $[N][N]:(0.. M1) init $[][]:=0 asgn $[][]>{*} kill +[i in 0.. N2](+[j in 0.. N1](($[i][j]`$[i+1][j]`>2)+($[i+1][j]`$[i][j]`>2)+($[j][i]`$[j][i+1]`>2)+($[j][i+1]`$[j][i]`>2)))


CROSSREFS

Sequence in context: A215910 A097323 A166943 * A068727 A135095 A219872
Adjacent sequences: A125530 A125531 A125532 * A125534 A125535 A125536


KEYWORD

nonn


AUTHOR

R. H. Hardin, Dec 31 2006


STATUS

approved



