I hope I can ask this question with enough clarity. It is not exactly clear in my head., but here goes
I have a number series, it starts at a random number and then increments by 8(always by 8) plus the last number.
for example in the series:
We start at 36 (randomly chosen)
We then add 8 to 36 to make 44
We then add 44 to 36 to make the next number in the series 80
Then we add 8 to 44 to make 52 and add that to 80 to make the next number in the series 132
So we have two sets of numbers one which is incrementing by 8 the other which is the addition of the incrementing numbers.
36, 44, 52, 60, 68, 76, 84, 92,100,108,116,124 36, 80,132,192,260,336,420,512,612,720,836,960 <== target series
Now I want to test whether another number exists in that series for example we can see that 612 is valid for that series but 680 is not.
Is the number 6992 a valid number for that series?
What about 500345264?
Is there a way I can test for validity without having to calculate every number in the series up until the one I want?
Is there a way I can count how many iterations I'd need to go through to get to the number. For example 612 is the 8th iteration.
This is part of a programming task (not school work but special interest) I will have tens of millions of these to calculate and I want the program to run as fast and as efficiently as possible.
So any help will be appreciated. If it can't be done then so be it, but not being a mathematician I thought I better ask before I gave up.