How many atoms in the hydrocarbon? How many atoms in the hydrocarbon?
A hydrocarbon is a chemical compound which consists of only hydrogen and carbon atoms. For this challenge, we will only consider the three simplest kinds of hydrocarbons: alkanes, alkenes, and alkynes with no branches.
An alkane with \$n\$ carbon atoms contains \$2n+2\$ hydrogen atoms. An alkene with \$n\$ carbon atoms contains \$2n\$ hydrogen atoms. An alkyne with \$n\$ carbon atoms contains \$2n-2\$ hydrogen atoms.
Each kind of hydrocarbon is named with a prefix indicating the number of carbon atoms it contains, followed by the suffix ane, ene, or yne if it is an alkane, alkene, or alkyne respectively. The numerical prefixes are as follows:
1  &lt;-&gt; meth
2  &lt;-&gt; eth
3  &lt;-&gt; prop
4  &lt;-&gt; but
5  &lt;-&gt; pent
6  &lt;-&gt; hex
7  &lt;-&gt; hept
8  &lt;-&gt; oct
9  &lt;-&gt; non
10 &lt;-&gt; dec

For example, we can see propane has 3 carbon and 8 hydrogen atoms, and heptyne has 7 carbon and 12 hydrogen atoms.
Challenge
Your task is to write a function or program that receives a string or list of characters representing the name of a hydrocarbon, and produces or outputs the number of carbon and hydrogen atoms in a molecule of that hydrocarbon.
For each of the 30 hydrocarbon names, the code must accept at least one possible capitalization of that name. For example, it is fine if your code works for mEthane but not methane, and ETHAnE but not ETHANE, and Propane but not propane. The inputs methene and methyne may give undefined output since those are not real chemicals.
The input and output can be in any convenient format. You don't need to label which number represents carbon and which represents hydrogen, just keep the order of the numbers consistent.
You may assume the input will correspond to a valid hydrocarbon, and there are at most 10 carbon atoms.
Examples
Possible Input -&gt; Possible Output
Methane        -&gt; 1 4
propane        -&gt; 3 8
Heptyne        -&gt; 7 12
Decene         -&gt; 10 20

Rules

No standard loopholes.
Shortest code in bytes wins.
05AB1E, &nbsp;27 26&nbsp; 24 bytes

Saved 1 byte thanks to @KevinCruijssen
Saved 2 bytes thanks to @Grimmy

Note: This code was based on my understanding that only the capitalization of the first letter was customizable. It has since been clarified that it applies to all letters, leading to this significantly shorter answer by Grimmy.

Expects mEpBPhHond for the capitalization of the first letter.

ćC•&gt;·¿*•s÷θD&gt;,₂I3(èH÷+·,


Try it online!

How?

We define the following magic constant:

$$M=1902159854$$

The number of carbon atoms is given by:

$$c=\left(\left\lfloor\frac{M}{n}\right\rfloor\bmod 10\right)+1$$

where \$n\$ is the first character of the input turned into an 05AB1E code point (0-9, A-Z, a-z, ...).

 input |  n  | floor(M/n) | mod 10
-------+-----+------------+--------
 meth- |  48 |   39628330 |   0
 Eth-  |  14 |  135868561 |   1
 prop- |  51 |   37297252 |   2
 But-  |  11 |  172923623 |   3
 Pent- |  25 |   76086394 |   4
 hex-  |  43 |   44236275 |   5
 Hept- |  17 |  111891756 |   6
 oct-  |  50 |   38043197 |   7
 non-  |  49 |   38819588 |   8
 dec-  |  39 |   48773329 |   9


Commented

                         # example input: 'Heptyne'
ć                        # extract the first character -&gt; 'H'
 C                       # turn it into an integer -&gt; 17
  •&gt;·¿*•                 # push the magic constant 1902159854
        s÷               # swap + integer division -&gt; 1902159854 / 17 = 111891756
          θ              # keep the last digit (therefore a modulo 10) -&gt; 6
           D&gt;            # duplicate and increment the copy
             ,           # print the number of carbon atoms
              ₂          # push 26
               I         # push the input string
                3(è      # extract the 3rd to last character -&gt; 'y'
                   H     # parse it as base-36 -&gt; 34
                    ÷    # integer division -&gt; 26 / 34 = 0
                     +   # add to the number of carbon atoms - 1 -&gt; 6
                      ·  # double
                       , # print the number of hydrogen atoms