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.

A138979 Number of 4 X n matrices containing a 1 in the top left entry, all entries are integer values and adjacent entries differ by at most 1.

Original entry on oeis.org

27, 771, 22979, 690437, 20780181, 625649047, 18838482047, 567241901289, 17080173559277, 514300085627023, 15486061794514775, 466299978310573033, 14040733816061115637, 422779788989982722559, 12730299739840800975879, 383321378409770250813777
Offset: 1

Views

Author

Wayne VanWeerthuizen, Apr 05 2008

Keywords

Comments

Horizontally or vertically adjacent entries can differ by at most 1. Diagonally adjacent entries thus differ by at most 2.

Crossrefs

Programs

  • Maple
    a:= n-> (Matrix([2,4,4,2,4,2,2,4,2,1]). Matrix([[3,4,2,2,2,0,1,0,1,0], [2,5,3,2,3,1,1,3,2,1], [1,3,5,1,4,2,2,4,2,1], [2,4,2,3,4,2,2,4,2,1], [1,3,4,2,7,3,3,6,3,2], [0,2,4,2,6,4,2,6,2,2], [1,2,4,2,6,2,4,6,2,2], [0,3,4,2,6,3,3,7,3,2], [1,4,4,2,6,2,2,6,4,2], [0,4,4,2,8,4,4,8,4,3]])^(n-1) .Matrix([[1],[1],[1],[1],[1],[1],[1],[1],[1],[1]]))[1,1]: seq(a(n), n=1..20); # Alois P. Heinz, Aug 28 2008
  • Mathematica
    LinearRecurrence[{45, -528, 2592, -5997, 5689, 812, -4760, 1942, 278, -112}, {27, 771, 22979, 690437, 20780181, 625649047, 18838482047, 567241901289, 17080173559277, 514300085627023}, 20] (* Paolo Xausa, Mar 17 2024 *)

Formula

a(n)=b(n)+c(n)+d(n)+e(n)+f(n)+g(n)+h(n)+j(n)+k(n)+l(n), where
b(1)=2,c(1)=4,d(1)=4,e(1)=2,f(1)=4,g(1)=2,h(1)=2,j(1)=4,k(1)=2,l(1)=1
b(n+1)=3*b(n)+2*c(n)+1*d(n)+2*e(n)+1*f(n)+0*g(n)+1*h(n)+0*j(n)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