cp's OEIS Frontend

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.

A285280 Array read by antidiagonals: T(m,n) = number of m-ary words of length n with cyclically adjacent elements differing by 2 or less.

This page as a plain text file.
%I A285280 #17 Aug 12 2023 11:35:16
%S A285280 1,3,1,9,4,1,27,14,5,1,81,46,19,6,1,243,162,65,24,7,1,729,574,247,84,
%T A285280 29,8,1,2187,2042,955,332,103,34,9,1,6561,7270,3733,1336,417,122,39,
%U A285280 10,1,19683,25890,14649,5478,1717,502,141,44,11,1
%N A285280 Array read by antidiagonals: T(m,n) = number of m-ary words of length n with cyclically adjacent elements differing by 2 or less.
%C A285280 All rows are linear recurrences with constant coefficients. See PARI script to obtain generating functions.
%H A285280 Andrew Howroyd, <a href="/A285280/b285280.txt">Table of n, a(n) for n = 3..1277</a>
%e A285280 Table starts (m>=3, n>=0):
%e A285280 1  3  9  27  81  243   729  2187 ...
%e A285280 1  4 14  46 162  574  2042  7270 ...
%e A285280 1  5 19  65 247  955  3733 14649 ...
%e A285280 1  6 24  84 332 1336  5478 22658 ...
%e A285280 1  7 29 103 417 1717  7229 30793 ...
%e A285280 1  8 34 122 502 2098  8980 38928 ...
%e A285280 1  9 39 141 587 2479 10731 47063 ...
%e A285280 1 10 44 160 672 2860 12482 55198 ...
%t A285280 diff = 2; m0 = diff + 1; mmax = 12;
%t A285280 TransferGf[m_, u_, t_, v_, z_] := Array[u, m].LinearSolve[IdentityMatrix[m] - z*Array[t, {m, m}], Array[v, m]]
%t A285280 RowGf[d_, m_, z_] := 1 + z*Sum[TransferGf[m, Boole[# == k] &, Boole[Abs[#1 - #2] <= d] &, Boole[Abs[# - k] <= d] &, z], {k, 1, m}];
%t A285280 row[m_] := row[m] = CoefficientList[RowGf[diff, m, x] + O[x]^mmax, x];
%t A285280 T[m_ /; m >= m0, n_ /; n >= 0] := row[m][[n + 1]];
%t A285280 Table[T[m - n, n], {m, m0, mmax}, {n, m - m0, 0, -1}] // Flatten (* _Jean-François Alcover_, Jun 16 2017, adapted from PARI *)
%o A285280 (PARI)
%o A285280 TransferGf(m,u,t,v,z)=vector(m,i,u(i))*matsolve(matid(m)-z*matrix(m,m,i,j,t(i,j)),vectorv(m,i,v(i)));
%o A285280 RowGf(d,m,z)=1+z*sum(k=1,m,TransferGf(m, i->if(i==k,1,0), (i,j)->abs(i-j)<=d, j->if(abs(j-k)<=d,1,0), z));
%o A285280 for(m=3, 10, print(RowGf(2,m,x)));
%o A285280 for(m=3, 10, v=Vec(RowGf(2,m,x) + O(x^8)); for(n=1, length(v), print1( v[n], ", ") ); print(); );
%Y A285280 Rows 3-32 are A000244, A124805, A124806, A124807, A124828, A124843, A124851, A124852, A124857, A124858, A124864, A124892-A124894, A124898, A124935, A124947, A124948-A124958, A124994, A124998.
%Y A285280 Cf. A285266, A276562, A285281.
%K A285280 nonn,tabl
%O A285280 3,2
%A A285280 _Andrew Howroyd_, Apr 15 2017