The Fibonacci numbers admit a straight-forward generalisation by modifying the recurrence relation
to
Another way to write this recursion is via matrix multiplication:
This matrix
Furthermore the polynomial has
An important companion of the Fibonacci numbers are the Lucas numbers
Accordingly we can define the
For small
This has been observed by
@apu_yokai
and
proven
in a collaborative effort on Twitter and Mathlog.
The proof is short and uses Newton's identities.
For this article I want to go in a different direction and ask: Why
The Matrix
This matrix is an adjacency matrix for the directed graph on
Here is an example for
Graph for k = 5
The powers of the adjacency matrix have a very useful interpretation, as explained in
Wikipedia
:
The
In particular, the trace counts the number of loops of length
(Caveat: two loops are considered different if their starting vertices are different, i.e.
The question now becomes: How many loops of length
From the graph we obtain a machine which produces non-zero binary numbers by labeling the edges:
Automaton for k = 5
To produce the binary number 00101
we use the loop
More examples:
00001
:
1101
:
00100
:
I think you can show by induction that every non-zero binary number of length
The number of loops is therefore the number of non-zero binary numbers on