The formula
The key to the formula is given by the name of the puzzle.
The solution for a throw is found by counting the "petals around the rose",
where a "rose" is any die face with a center dot. On a standard 6-sided die,
this corresponds to the three odd facesโ1, 3, and 5.
The rose's "petals" are the dots which surround the center dot.
There is no rose on the 2, 4, or 6 faces, so these count as zero.
There are no petals on the 1 face, so it also counts as zero.
There are two petals and four petals on the 3 and 5 faces, respectively.
Thus, the solution to a given throw can be found by:
Adding the total petals, or;
Starting with 2 times the number of dice that land on the 3 face
and adding to it 4 times the number of dice
that lands on the 5 face.
In the example above, there is one 3 and one 5 face,
so the result is two plus four, or six.
https://en.wikipedia.org/wiki/Petals_Around_the_Rose