This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A351759 #18 May 16 2022 09:33:21 %S A351759 1,1,3,37,3593,2336376,12085125703,492300320300251, %T A351759 163856834420168837331,450436951076447377275760495, %U A351759 10360995769563446558192576106611177,2010994252878923176109086647579398800496256,3317129856969862808949985510559979253492213624483355 %N A351759 Number of words either empty or beginning with the first letter of the n-ary alphabet, where each letter of the alphabet occurs n times and letters of neighboring word positions are equal or neighbors in the alphabet. %C A351759 Also the number of (n^2-1)-step walks on n-dimensional cubic lattice from (1,0,...,0) to (n,n,...,n) with positive unit steps in all dimensions such that the absolute difference of the dimension indices used in consecutive steps is <= 1. %H A351759 Andrew Howroyd, <a href="/A351759/b351759.txt">Table of n, a(n) for n = 0..40</a> %F A351759 a(n) = A208673(n,n). %e A351759 a(2) = 3: %e A351759 +----+ +----+ +----+ %e A351759 |aabb| |abab| |abba| %e A351759 +----+ +----+ +----+ %e A351759 |1222| |1122| |1112| %e A351759 |0012| |0112| |0122| %e A351759 +----+ +----+ +----+ %e A351759 |xx | |x x | |x x| %e A351759 | xx| | x x| | xx | %e A351759 +----+ +----+ +----+ %e A351759 a(3) = 37: aaabbbccc, aaabbcbcc, aaabbccbc, aaabbcccb, aaabcbbcc, aaabcbcbc, aaabcbccb, aaabccbbc, aaabccbcb, aaabcccbb, aababbccc, aababcbcc, aababccbc, aababcccb, aabbabccc, aabbcccba, aabcbabcc, aabcbccba, aabccbabc, aabccbcba, aabcccbab, aabcccbba, abaabbccc, abaabcbcc, abaabccbc, abaabcccb, abababccc, ababcccba, abbaabccc, abbcccbaa, abcbaabcc, abcbccbaa, abccbaabc, abccbcbaa, abcccbaab, abcccbaba, abcccbbaa. %p A351759 b:= proc(l, t) option remember; (n-> `if`(l=[0$n], 1, %p A351759 add(`if`(l[i]=0, 0, b(subsop(i=l[i]-1, l), i)), %p A351759 i=max(1, t-1)..min(n, t+1))))(nops(l)) %p A351759 end: %p A351759 a:= n-> b([n$n], 0): %p A351759 seq(a(n), n=0..6); %t A351759 b[l_, t_] := b[l, t] = Function [n, If[l == Array[0&, n], 1, %t A351759 Sum[If[l[[i]] == 0, 0, b[ReplacePart[l, i -> l[[i]] - 1], i]], %t A351759 {i, Max[1, t - 1], Min[n, t + 1]}]]][Length[l]]; %t A351759 a[n_] := b[Array[n&, n], 0]; %t A351759 Table[Print[n, " ", a[n]]; a[n], {n, 0, 7}] (* _Jean-François Alcover_, May 16 2022, after _Alois P. Heinz_ *) %Y A351759 Main diagonal of A208673. %K A351759 nonn %O A351759 0,3 %A A351759 _Alois P. Heinz_, Feb 18 2022