I'm trying to write a piece of code that will compute values of wavelengths in such a way that for while n = 1, it checks the values for k = 2, 3, 4, 5 and 6. And I need to to do that up to n = 4, with 5 sequential integers k starting from n + 1. IE if n = 3, check for k = 4, 5, 6, 7, and 8. So there will be a total of 20 wavelengths. The code I currently have prints out 20 wavelengths, with the first one being correct for each n, but the next 4 are incorrect. I'm not sure how to fix this, please help
for n in range (1, 5):
for k in range (2, 7):
k = n + 1
RH = 1.09678e-2
waveLength = 1 / (R_H * (1/n**2 - 1/k**2))
print(waveLength)