Challenge
You are supposed to output the series I recently designed which goes as follows which are pen stroke counts of ascending prime numbers:
2, 3, 2, 4, 3, 5, 6, 5, 7, 7, 7, 10, 4, 6, 7, 4, 4, 4, 7, 6, 8...
Example
This is an illustration of how this series is formed, first, it takes a prime number from in sequence form, so it takes the first prime number 2
. It converts it to the Roman numeral of 2, which is II
, here pen stroke is a straight long line, in this case, it is two so the first element in this series is 2
.
Dictionary
It will really be confusing to explain the pen stroke for each letter, and we know all Roman numerals contain characters I, V, X, L, C, D, M
only, here is already shown pen stroke value of each letter
0 C
1 I, L, D
2 V, X
3 [None]
4 M
For example MMMMMMMCMXIX
is the Roman numeral 7919
so you compare it with the above dictionary M
has 4 pen strokes and so on, they add to 37
pen strokes.
Ambiguities
It can be queried why M
is not assigned 2
strokes, and L
is not assigned 2 strokes; it is because they are not written this way in numeral numbers. As M and L are written:
In standard Roman numerals, M makes 4 pen strokes and L as 1 because another line of L is too small to be considered a pen stroke.
Task
Write the shortest code in the number of bytes that takes an input number, and outputs as many elements from the input as possible.
Test Cases
5 => 2, 3, 2, 4, 3
10 => 2, 3, 2, 4, 3, 5, 6, 5, 7, 7
15 => 2, 3, 2, 4, 3, 5, 6, 5, 7, 7, 7, 10, 4, 6, 7
Do not forget that it is the implementation of pen stroke counts of Roman numerals of prime numbers in ascending order only!
MMMMMMMCMXIX
has 37 pen strokes, not 33. (M:4 x 8 + C:0 x 1 + X:2 x 2 + I:1 = 32 + 0 + 4 + 1 = 37) \$\endgroup\$M
s? \$\endgroup\$