On Gödel Escher Bach, on page 137 there are two “married” functions defined:

for n >= 1:

F(n) = n – M(F(n – 1))

M(n) = n – F(M(n – 1))

for n = 0:

F(0) = 1, M(0) = 0

I wondered whether it is easy to define three function that increase their value every time n is increased by three, using only addition, subtracting and recursive calls to the previous value of the functions. It turns out it is not too hard to find some.

for n >= 1

F(n) = n – M(n – 1) – N(F(n – 1) + M(n – 1) + N(n – 1) – 2)

M(n) = F(n – 1)

N(n) = M(n – 1)

for n = 0:

F(0) = 1, M(0) = 0, N(0) = 0