0

How to solve or simplify the following recursive function? $f(x)$ is defined only for whole numbers as follows:

$$f(x)=\begin{cases} 1 & \mbox{if } x<k; \\ f(x-k)+f(x/k) & \mbox{if } x\ge{k} \mbox{ and } k \mbox{ divides } x;\\ f(x-1) & \mbox{otherwise}. \end{cases}$$

Here $k$ is a positive integer $\le10$.

Librecoin
  • 2,740

1 Answers1

1

This is the number of different ways to write $x$ as the sum of powers of $k$
I found the solution in a 1940 paper, that I copied into the following question: how many ways to make change, asymptotics

Empy2
  • 50,853