For every integer 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 and Also, 2015 is spelt “ two thousand and fifteen ”, hence .
Determine the value of
This problem is part of the set 2015 Countdown Problems .
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 ≤ 9 9 . 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 ≤ 9 9 , max ( f ( N ) ) = 7 + 5 = 1 2 and f − 1 ( max ( f ( N ) ) ) = f − 1 ( 1 2 ) = 77 or 78 (meaning that the longest spelt 2-digit numbers are " seventy seven " and " seventy eight " at 12 letters long). Since f ( N ) ≤ 1 2 , it can be determined that f 2 ( N ) ≤ f ( 1 2 ) ≤ 6 < 9 , implying that lim k → ∞ f k ( N ) = 4 for 0 < N ≤ 9 9 .
When we expand the boundary all the way to 0 < N ≤ 2 0 1 5 as stated in the question, it is clear that f ( N ) ≤ 9 9 (meaning that any spelt number from 1 to 2015 is clearly less than 100 letters long; for observation note that max ( N ) = 3 8 occurs when N = 1 7 7 7 ). Therefore, k → ∞ lim f k ( N ) = 4 ∀ 0 < N ≤ 2 0 1 5
As such, N = 1 7 9 4 ∑ 2 0 1 5 ( k → ∞ lim f k ( N ) ) = N = 1 7 9 4 ∑ 2 0 1 5 ( 4 ) = ( 2 0 1 5 − 1 7 9 4 + 1 ) ( 4 ) = 8 8 8