OFFSET
1,1
COMMENTS
Number of words of length n using a 9 symbol alphabet where neighboring letters are neighbors in the alphabet. - Andrew Howroyd, Apr 17 2017
LINKS
FORMULA
Empirical G.f.: x*(9+16*x-15*x^2-24*x^3+x^4)/(1-5*x^2+5*x^4). [Colin Barker, Sep 02 2012]
MATHEMATICA
b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i == 0, Sum[b[n - 1, j, k], {j, 1, k}], If[i>1, b[n-1, i-1, k], 0] + If[i<k, b[n-1, i+1, k], 0]]];
a[n_] := b[n, 0, 9];
Array[a, 31] (* Jean-François Alcover, Jul 01 2018, after Alois P. Heinz *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Joseph Myers, Dec 24 2008
STATUS
approved