Working with wave number equations, use trial-and-error?

I have a wave number question which I have partially solved:



> 
> What transition in $\ce{He+}$ ion shall have the same wavenumber as the first line in Balmer series of $\ce{H}$ atom?
>  (a) $7\to5$ (b) $5\to3$ (c) $6\to4$ (d) $4\to2$
> 
> 
> 


**Here's how I solved it:**


Note: symbol $Z$ is the atomic number  

and $1/\lambda$ is wave number (I have written frequency by mistake)


![Solving the problem](https://i.stack.imgur.com/E08cT.jpg)


At this point my teacher told me to continue using a trial and error method, is there any other way to solve this, perhaps using some other equation.




Yes, there is.


  

hydrogen: $$E=\frac{1}{hc}R\left(\frac{1}{(n\_1)^2}-\frac{1}{(n\_2)^2}\right)$$


helium ion: $$E=\frac{1}{hc}R(2)^2\left(\frac{1}{(x\_1)^2}-\frac{1}{(x\_2)^2}\right)$$


Since the energy is equal, we get: $$\frac{1}{(n\_1)^2}-\frac{1}{(n\_2)^2} = 4\left(\frac{1}{(x\_1)^2}-\frac{1}{(x\_2)^2}\right)$$


with simple rearragement: $$\frac{1}{(n\_1)^2}-\frac{1}{(n\_2)^2} = \frac{1}{\left(\frac{x\_1}{2}\right)^2}-\frac{1}{\left(\frac{x\_2}{2}\right)^2}$$


  
  

Here, one (obviously) possible answer of the equation is:
$$n\_1 = \frac{x\_1}{2}, n\_2 = \frac{x\_2}{2}$$


  

First balmer line is $n\_1=3, n\_2=2$. One possible answer is $x\_1=6, x\_2=4$


Ok, I know that with single linear equation and two variables, we can get multiple answers in the case of real numbers (actually, infinite). However, quantum number n can only be positive integer. I don't think there are other answers here.


 7


> 
> […] my teacher told me to continue using a trial and error method […]
> 
> 
> 


But nobody told you to do it **manually** once you have understood how to adjust the *Rydberg* constant for $\ce{He+}$ and use the formula to get the energies for the given transistions, in order to compare them with the $\ce{H\_{\alpha}}$ line (656.3 nm):



```
import scipy.constants

transitions = ((7,5), (5,3), (6,4), (4,2))

def get_he_line_nm(n_upper, n_lower):
    '''calculate the energy for a line in a He+ spectrum and return 
       it in nanometer''' 

    energy = 4 * scipy.constants.Rydberg * (pow(n_lower, -2) - pow(n_upper, -2))

    return 1.0/(scipy.constants.nano * energy) 
    # energy in nm


for upper, lower  in transitions:
    wavelength = get_he_line_nm(upper, lower)
    print('{0} -> {1} : {2:7.2f} nm'.format(upper, lower, wavelength)) 

```

will give the output




```
7 -> 5 : 1162.81 nm
5 -> 3 :  320.37 nm
6 -> 4 :  656.11 nm
4 -> 2 :  121.50 nm

```

 7