*
0<N≤2015
*
, let
*
f(N)
*
denote the number of letters when N is spelt in English.

For example, 77 is spelt “
*
seventy seven
*
”, hence
$f(77)=7+5=12$
and
$f^2 (77)=f(12)=6$
Also, 2015 is spelt “
*
two thousand and fifteen
*
”, hence
$f(2015)=3+8+3+7=21$
.

Determine the value of $\sum_{N=1794}^{2015} (\lim _{ k\rightarrow \infty }{ f^ { k} (N) } )$

*
This problem is part of the set
2015 Countdown Problems
.
*

The answer is 888.

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

Observe that the only value of $N$ such that $f(N)=N$ is $N=4$ (since 4 is spelt as “

four” which has 4 letters).We first set the boundaries at $0<N≤9$ . Also, note that $\max(f(N))=5$ and $f^{-1} (\max{(f(N))} )=f^{-1} (5)=$ 3,7 or 8 (meaning that the longest spelt numbers from 1 to 9 are “

three”, “seven” and “eight” at 5 letters long). With some work it can be deduced that $\lim_{k→∞}{f^k (N)}=4$ for $0<N≤9$ .We now expand the boundary to $0<N≤99$ . Observe that $\max{(f(N))}=7$ when $f(N)$ is a multiple of 10 (meaning that the longest spelt multiple of 10 is “

seventy” at 7 letters long). Hence for $0<N≤99$ , $\max(f(N))=7+5=12$ and $f^{-1} (\max{(f(N))} )=f^{-1} (12)=$ 77 or 78 (meaning that the longest spelt 2-digit numbers are "seventy seven" and "seventy eight" at 12 letters long). Since $f(N)≤12$ , it can be determined that $f^2 (N)≤f(12)≤6<9$ , implying that $\lim_{k→∞}{f^k (N)}=4$ for $0<N≤99$ .When we expand the boundary all the way to $0<N≤2015$ as stated in the question, it is clear that $f(N)≤99$ (meaning that any spelt number from 1 to 2015 is clearly less than 100 letters long; for observation note that $\max(N)=38$ occurs when $N=1777$ ). Therefore, $\lim_{k→∞}{f^k (N)}=4 \mbox{ } \forall \mbox{ } 0<N≤2015$

As such, $\sum_{N=1794}^{2015}(\lim_{k→∞}{f^k (N)}) = \sum_{N=1794}^{2015}(4) =(2015-1794+1)(4)=888$