A086346 On a 3 X 3 board, the number of n-move paths for a chess king ending in a given corner square.
1, 3, 18, 80, 400, 1904, 9248, 44544, 215296, 1039104, 5018112, 24227840, 116985856, 564850688, 2727354368, 13168803840, 63584665600, 307013812224, 1482394042368, 7157631156224, 34560101318656, 166870928850944, 805724122775552, 3890380202311680, 18784417308737536, 90699190027419648
Offset: 0
References
- Gary Chartrand, Introductory Graph Theory, pp. 217-221, 1984. [From Johannes W. Meijer, Aug 01 2010]
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Mike Oakes, KingMovesForPrimes.
- Zak Seidov et al., New puzzle? King moves for primes, digest of 28 messages in primenumbers group, Jul 13 - Jul 23, 2003. [Cached copy]
- Zak Seidov, KingMovesForPrimes.
- Sleephound, KingMovesForPrimes.
- Index entries for linear recurrences with constant coefficients, signature (2,12,8).
Crossrefs
Programs
-
Magma
[2^(n-3)*(Evaluate(DicksonFirst(n+2,-1), 2) +2*(-1)^n): n in [0..30]]; // G. C. Greubel, Aug 18 2022
-
Maple
with(LinearAlgebra): nmax:=19; m:=1; A[5]:= [1, 1, 1, 1, 0, 1, 1, 1, 1]: A:=Matrix([[0, 1, 0, 1, 1, 0, 0, 0, 0], [1, 0, 1, 1, 1, 1, 0, 0, 0], [0, 1, 0, 0, 1, 1, 0, 0, 0], [1, 1, 0, 0, 1, 0, 1, 1, 0], A[5], [0, 1, 1, 0, 1, 0, 0, 1, 1], [0, 0, 0, 1, 1, 0, 0, 1, 0], [0, 0, 0, 1, 1, 1, 1, 0, 1], [0, 0, 0, 0, 1, 1, 0, 1, 0]]): for n from 0 to nmax do B(n):=A^n: a(n):= add(B(n)[m, k], k=1..9): od: seq(a(n), n=0..nmax); # Johannes W. Meijer, Aug 01 2010
-
Mathematica
Table[(1/32)(2(-2)^(n+2)+(2+Sqrt[8])^(n+2)+(2-Sqrt[8])^(n+2)), {n, 0, 19}] // FullSimplify LinearRecurrence[{2,12,8}, {1,3,18}, 31] (* G. C. Greubel, Aug 18 2022 *)
-
PARI
Vec((1+x)/((1+2*x)*(1-4*x-4*x^2))+O(x^30)) \\ Joerg Arndt, Jan 29 2024
-
SageMath
[2^(n-3)*(lucas_number2(n+2,2,-1) +2*(-1)^n) for n in (0..30)] # G. C. Greubel, Aug 18 2022
Formula
a(n) = (1/32)*(2*(-2)^(n+2) + (2+sqrt(8))^(n+2) + (2-sqrt(8))^(n+2)).
From R. J. Mathar, Jul 22 2010: (Start)
a(n) = 2*a(n-1) + 12*a(n-2) + 8*a(n-3).
G.f.: (1+x) / ( (1+2*x)*(1-4*x-4*x^2) ).
a(n) = 2^(n-3)*(A002203(n+2) + 2*(-1)^n). - G. C. Greubel, Aug 18 2022
Extensions
Offset changed and edited by Johannes W. Meijer, Jul 15 2010
Comments