GradLineDegree = 
{
3242,
3180,
3009,
2962,
2939,
2810,
2796,
2612,
2196,
1528,
1516,
1504,
1052,
979
};

GradLine = 
{
6907,
6716,
6234,
6123,
6072,
5790,
5769,
5460,
4916,
4358,
4347,
4339,
4077,
4046
};

HydrogenDegrees = 
{
3122,
2142,
1506
};

GradLine = Function[x, x/(10^10)]/@GradLine;


FunTable = Table[{GradLine[[i]], GradLineDegree[[i]]},{i,1,14}];
InverseFunTable = Table[{GradLineDegree[[i]], GradLine[[i]]}, {i, 1,14}];
ListLinePlot[FunTable,Mesh -> Automatic,GridLines->Automatic, AxesLabel -> {"λ(нМ)", "Degrees" }]

QuantNumbers = {3,4, 5};
DegreeFunction = Interpolation[InverseFunTable];
HydrogenLamdas = Table[N[DegreeFunction[HydrogenDegrees[[i]]]],{i, 1, 3}]

WaveNumbersHydrogen = Function[x, 1/x]/@ HydrogenLamdas;
InverseQuantNumbers = Function[x, 1/(x^2)] /@ QuantNumbers;

WaveNFromQuantFuncTable = Table[{InverseQuantNumbers[[i]],WaveNumbersHydrogen[[i]]},{i,1,3}];
WaveNFromQuantFunc = LinearModelFit[WaveNFromQuantFuncTable, x, x];Plot[WaveNFromQuantFunc[x],{x,Min[WaveNumbersHydrogen], Max[WaveNumbersHydrogen]}]
RidbergConstFromGraph = WaveNFromQuantFunc'[x]
RidgergConstQuaterGraph = WaveNFromQuantFunc[0]
RidbergConstFromGraphSecond = RidgergConstQuaterGraph*4
En = (RidbergConstFromGraphSecond*3*(10^8)*6.58*(10^-34))/(1.6*10^-19)