Eric likes to play with numbers. He has made this overview of numbers and Belgian flags. What series replaces the question marks?

belgische getallen
A puzzle where Belgian numbers play a key role.

Assignment

Belgian numbers play a key role in the above puzzle. A number $$n \in \mathbb{N}$$ is a Belgian $$k$$-number ($$k \in \mathbb{N}$$) if it occurs in the infinite number sequence that begins with $$k$$ and whose differences between two consecutive numbers repeatedly equal the consecutive digits of $$n$$. The number $$k$$ is called the seed of the number sequence.

Suppose that $$k = 7$$. To check whether $$n = 152$$ is a Belgian 7-number, we construct the number sequence that begins with 7 and whose differences between consecutive numbers are equal to the repeated sequence +1, +5, +2, +1, +5, +2, +1, … (the consecutive digits of the number 152). This yields the number sequence

7, 8, 13, 15, 16, 21, 23, 24, 29, 31, …

If 152 occurs in this number sequence then it is a Belgian 7-number, which is indeed the case here. The number 108 is a Belgian 0-number, as follows from the number sequence

0, 1, 1, 9, 10, 10, 18, 19, 19, 27, …, 90, 91, 91, 99, 100, 100, 108, 109, 109, …

A number $$n \in \mathbb{N}$$ is a Flemish number if it is a Belgian $$k$$-number, with $$k$$ the first digit of $$n$$. As such, the number 179 is a Flemish number because it is a Belgian 1-number, as follows from the number sequence

1, 2, 9, 18, 19, 26, 35, 36, 43, 52, …, 154, 155, 162, 171, 172, 179, 188, 189, …

A number $$n \in \mathbb{N}$$ is a West Flemish number if it is a Flemish number whose number sequence starts with the digits of $$n$$, in the same order. As such, the number 8161 is a West Flemish number because it is a Belgian 8-number with number sequence

8, 16, 17, 23, 24, 32, 33, 39, 40, …, 8145, 8151, 8152, 8160, 8161, 8167, 8168, …

Your task:

Example

>>> sequence(108)
[0, 1, 1, 9, 10, 10, 18, 19, 19, 27, 28, 28, 36, 37, 37, 45, 46, 46, 54, 55, 55, 63, 64, 64, 72, 73, 73, 81, 82, 82, 90, 91, 91, 99, 100, 100, 108]
>>> sequence(123, count=10)
[0, 1, 3, 6, 7, 9, 12, 13, 15, 18]
>>> sequence(n=81, k=1)
[1, 9, 10, 18, 19, 27, 28, 36, 37, 45, 46, 54, 55, 63, 64, 72, 73, 81]
>>> sequence(n=61, k=6)
[6, 12, 13, 19, 20, 26, 27, 33, 34, 40, 41, 47, 48, 54, 55, 61]

>>> isbelgian(81)
True
>>> isbelgian(108)
True
>>> isbelgian(n=81, k=1)
True
>>> isbelgian(n=108, k=1)
False

>>> seeds(108)
[0, 8, 9, 17, 18, 26, 27, 35, 36, 44, 45, 53, 54, 62, 63, 71, 72, 80, 81, 89, 90, 98, 99, 107, 108]
>>> seeds(81)
[0, 1, 9, 10, 18, 19, 27, 28, 36, 37, 45, 46, 54, 55, 63, 64, 72, 73, 81]

>>> isflemish(108)
False
>>> isflemish(81)
False
>>> isflemish(61)
True
>>> isflemish(68)
True

>>> iswestflemish(108)
False
>>> iswestflemish(81)
False
>>> iswestflemish(61)
True
>>> iswestflemish(68)
False

Epilogue

The Eric in the puzzle is a reference to the Belgian amateur mathematician Éric Angelini, who invented the Belgian numbers around 2005. He first called them Eric numbers, but later changed their name by analogy with Roman1, Arabic2 and Catalan3 numbers.

West Flanders
West Flanders (red) is a province in Flanders. Flanders (red + orange) is a region in Belgium. Belgium (red + orange + yellow) is a country in Europe.

The names for the Flemish and West Flemish numbers have been invented for this assignment. There official names are self-Belgian numbers of the first and second kind.

Resources