4

Context

I am a high school student and am curious about how many squares a knight can reach on an infinite chessboard. I drew some iterations out by hand and did a few in Python to find the sequence: $1, 9, 41, 108, 205, 325$ for the first few terms.

I found this sequence on the OEIS, Where I found the recurrence relation and the explicit formula.

$$ S_{n} = 3S_{n-1} - 3S_{n-2} + S_{n-3} \tag{1}$$

and

$$ S_{n} = 14n^{2}-6n+1+4\mathrm{sign}(n(n-1)(n-3)) $$

or

$$ S_{n} = 14n^{2}-6n+5\text{ for } n\geq 4 \tag{2}$$

What I know:

  • Prove these two formulas are equivalent using induction
  • Derive the explicit formula from the recurrence relation by using the characteristic equation
  • Derive the recurrence relation from the explicit formula using generating functions.

However, for a satisfying result, I want to derive both these formulas directly from the sequence.

Question

Derive equation $(1)$ or $(2)$ from the sequence.

My approach

Note: I don't have experience in this area except in arithmetic and geometric sequences, but I am willing to learn new topics.

I have been trying to find a recurrence relation from the data, and then using the characteristic equation to find the closed function. I expected that finding the recurrence relation would be easier than the closed function since there are an infinite many functions that go through a finite many points. I came across a 'difference degree' method, but I checked up to the 12'th degree difference and they never became constant. I haven't come across any other method that I can use to find such a relation except 'just look at the data and find it'. I am aware I can use code to find this function by trial and error but that won't generalise as I need it to.

A higher generalisation

Amidst this question, I wondered how many squares an (a, b) leaper would reach in n many moves. I don't know how to generalise to this level. I don't even know how to approach it. My intuitive reasoning was that it might be the same for all a and b values since it would be just 'scaling' the (1, 2) leaper's pattern. I then simulated a few situations up to $n = 10$ for $ 0\leq a\leq 10$ and $ 0\leq b\leq 10$ and quickly saw this was wrong. The numbers start the same and then diverge at $n = 3$ and more at $n = 5, 7, 9...$. I plotted all this data on a spreadsheet, here is the link.

Another question: find a function $S(a, b, n)$ that outputs how many squares can an (a, b) leaper reach in n moves. Alternatively if I could also just get directions or topics to explore to approach this problem, that would also be appreciated.

Patterns

Below I have some patterns I generated using code to visualise the squares, It was helpful for me.

$a = 1, b = 2, n = 9$: (knight) (1, 2) leaper squares

$a = 1, b = 3, n = 6$: (1, 3) leaper squares

$a = 4, b = 5, n = 3$: (4, 5) leaper squares

Saksham
  • 125
  • You can't derive a recurrence equation directly from a (finite) sequence of numbers, since there are infinitely many recurrences satisfied by any particular finite sequence of numbers. You have to know something about the recurrence, like its degree, whether it is linear with constant coefficients, in order to get it from a finite sequence of terms. – Gerry Myerson Aug 09 '24 at 12:52
  • See also previous discussion at https://math.stackexchange.com/questions/1092952/king-and-knight-moving-on-an-infinite-chess-board – Gerry Myerson Aug 09 '24 at 12:54
  • @GerryMyerson Is it not possible to use the logic of finding a new iteration to somehow come up with a recurrence relation? Also, In the past question you shared, the answers just referred to the OEIS and never derived the function. Am I missing something? – Saksham Aug 09 '24 at 14:36
  • 1
    This paper linked in the OEIS sequence gives a derivation for $(2)$ by counting the number of new squares that can be reached on the $k$th move (i.e. $28k-20$ new squares can be reached on the $k$th move). – Varun Vejalla Aug 09 '24 at 15:38
  • You write, "I want to derive both these formulas directly from the sequence." That, you cannot do. But now you ask a different question: "use the logic of finding a new iteration to somehow come up with a recurrence relation." I'm not sure what you mean by that, but if you have a logical way to relate $S_n$ to $S_{n-1}$ (or to $S_{n-1}$, $S_{n-2}$, and $S_{n-3}$, say), then you can certainly use that to write down a recurrence. – Gerry Myerson Aug 10 '24 at 03:15
  • Any thoughts on the answer I posted yesterday? – Gerry Myerson Aug 12 '24 at 00:22
  • Apologies for the inactivity. – Saksham Aug 12 '24 at 00:33
  • @GerryMyerson, I acknowledge that it is a somewhat different question, but I even tried using a separate approach of 'logic' to find the recurrence. I tried a method where, for each previous square it can reach 8 new squares, then negate the 'overlaps'. The issue was that as the iterations increased the number of squares from the previous iteration that could reach a new square increased, and I couldn't find a pattern there. Is there any other way? I continue to ask because finding a way to derive the equations using the logic may help to generalise to an (a, b) leaper. – Saksham Aug 12 '24 at 00:45
  • @VarunVejalla Thanks for the resource. I tried looking through the links on the OEIS but they weren't taking me anywhere. I will try to read through it soon. Also, the MathJax editing is much appriciated. – Saksham Aug 12 '24 at 00:47
  • Note that your diagram for $n=9$ shows a filled-in octagon plus some fuzz around the edges. It may be the case that you get that for all $n\ge4$. If so, you should be able to work out how many squares are in the octagon (as a function of $n$), and how many are in the fuzz, and get a formula for $S_n$ (for $n\ge4$) that way. – Gerry Myerson Aug 12 '24 at 01:07

1 Answers1

1

"I came across a 'difference degree' method, but I checked up to the $12$th degree difference and they never became constant."
I'm not sure exactly what you did, but here's a table of successive differences (notice that $S_3=109$, whereas you have given it as $108$): $$ \matrix{1&9&41&109&205&325&473&649&853&1085&1345&1633\cr &8&32&68&96&120&148&176&204&232&260&288\cr &&24&36&28&24&28&28&28&28&28&28\cr} $$ The $2$nd degree difference (the $3$rd row) is already constant, from the $5$th entry ($n=4$) onward. Assuming that this pattern continues forever, the usual techniques tell us that $$ S_n=28{n-4\choose2}+120(n-4)+205 $$ for $n\ge4$, which we can also write as $S_n=14n^2-6n+5$

Is this the kind of thing you were looking for?

Gerry Myerson
  • 185,413
  • That makes sense to derive equation (2). I mistakenly looked for the same difference through all n > 0, not just n > 3. I have some further questions. Is there a way to derive the equation for n > 0 (the one with sign() )? Also, could this generalise to an (a, b) leaper? If so, how would that be achieved? – Saksham Aug 12 '24 at 00:37
  • Let $a_n=14n^2-6n+5$ for all $n$. Then $a_n$ agrees with $S_n$ for $n\ge4$. $a_n$ starts $5,13,49,113$, so $a_n-S_n$ goes $4,4,8,4,0,0,\dotsc$. So $a_n-S_n-4$ goes $0,0,4,0,-4,-4\dotsc$. That sequence is $-4\sigma(n(n-1)(n-3))$ where $\sigma$ is the sign function. so $S_n=a_n-4+4\sigma(n(n-1)(n-3)$ for $n\ge0$. As for the leaper, why don't you try it, and see? – Gerry Myerson Aug 12 '24 at 00:59