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 A138978 #26 Sep 27 2024 01:57:42 %S A138978 9,121,1665,22979,317259,4380445,60481881,835088891,11530288395, %T A138978 159201677509,2198138788809,30350271502115,419054058355851, %U A138978 5785987905016141,79888633386248025,1103043049708026539,15230001039404897259,210284568423392013685,2903453493049800669321 %N A138978 Number of 3 X n matrices containing a 1 in the top left entry, all entries are integer values and adjacent entries differ by at most 1. %C A138978 Horizontally or vertically adjacent entries can differ by at most 1. Diagonally adjacent entries thus differ by at most 2. %H A138978 Alois P. Heinz, <a href="/A138978/b138978.txt">Table of n, a(n) for n = 1..800</a> %H A138978 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (16,-31,10). %F A138978 a(n) = b(n)+c(n)+d(n), where b(1)=1, c(1)=6, d(1)=2, with b(n+1)=3*b(n)+2*c(n)+1*d(n), c(n+1)=12*b(n)+10*c(n)+6*d(n), d(n+1)=2*b(n)+2*c(n)+3*d(n). %F A138978 G.f.: -x*(8*x^2-23*x+9) / (10*x^3-31*x^2+16*x-1). - _Colin Barker_, Dec 03 2012 %p A138978 a:= n-> (Matrix([1,6,2]). Matrix([[3,12,2], [2,10,2], [1,6,3]])^(n-1) .Matrix([[1],[1],[1]]))[1,1]: seq(a(n), n=1..20); # _Alois P. Heinz_, Aug 28 2008 %t A138978 LinearRecurrence[{16, -31, 10}, {9, 121, 1665}, 25] (* _Paolo Xausa_, Mar 17 2024 *) %Y A138978 Cf. A138977, A138979. %K A138978 nonn,easy %O A138978 1,1 %A A138978 _Wayne VanWeerthuizen_, Apr 05 2008 %E A138978 More terms from _Alois P. Heinz_, Aug 28 2008