I've always found it quite annoying how some numbers in English don't have the same number of syllables even though they have the same number of digits. Example:
seven has 2 syllables whereas all of the other digits have one (other than
So, when I'm counting in time to something (like a drill cadence in cadets or in the military), it doesn't sound as nice because you have a random extra syllable.
But I appear to have found a solution to this!
Instead of counting the regular way, we omit the number
eight. That way, the second syllable of
seven carries into where
eight would have been. So, we get the following:
1 2 3 4 5 6 7 8 9 10 one two three four five six se - ven nine ten
But, it's hard to count this way for higher numbers, so I need your help to make a program to help me figure out which numbers to count!
Input will be given as a single positive integer. For the purposes of this challenge, you may assume that all numbers are less than or equal to
999 999 999 999 999 (
1 quadrillion - 1) This is because "quadrillion" has a different number of syllables than "million", "billion", and "trillion", and I needed to specify an upper bound somewhere. Since as @HelkaHomba pointed out most languages have a cap at
2^32 which is somewhere around 4 billion, you can use your language's integer bound as the limit (this must be at least 1 million to be considered valid).
Output will be given as a list of integers (to be specified below). The exact formatting will not be specified, but as long as it is easy to see what the list is and it does not contain arbitrary numbers everywhere, it is pretty flexible.
What's in the list
Pretty much, starting from
i = 1, append
i to the list. Then, take the number of syllables in
i (let this be
s) and omit the next
s - 1 numbers. Keep doing this until
i > n where
n is the input.
For the purposes of this challenge, assume that the word
and is never present (so
one hundred one).
Input -> Output 10 -> 1 2 3 4 5 6 7 9 10 7 -> 1 2 3 4 5 6 7 8 -> 1 2 3 4 5 6 7 25 -> 1 2 3 4 5 6 7 9 10 11 14 16 18 20 22 25
Additionally, since I need to be able to carry this around on a cue card when counting things in time, your program needs to be as short as possible (in bytes)!