1/root 88 112 136 160 184 208 232
square 81 100 121 144 169 196 225
index 1 2 3 4 5 6 7
64 17 19 21 23 25 27 29 (256 → 1024)
64 + 24 = 88 + 24 = 112 + 24 = 136 + 24 = 160 + 24 = 184 + 24 = 208 + 24 = 232 + 24 = 256
We want the amount of squares in between 64 256 including 256 = 8 (always the root of course):
So here are mapping offsets:
For > 64….. and < 256
88 = 7 (always base power of 4 square (64) root = 8 -1 ) ← no math beyond getting the 7
112 = 12
136 = 15
160 = 16 (always root * 2)
184 = 15
208 = 12
232 = 7
for > 256….. and < 1024
289 - 15 (always base root – 1) ← (don’t do math with this beyond getting the 15)
xxxx etc.
576 = 64 (the root * 2)
xxxx
961 = 15
The pattern seems to be, the first next perfect square after 64… = 8 – 1 = 7. Then + next odd number down (5) = 12 + NOD = 15 + NOD = 16. Then subtracts the same values back down to 7 for 232 (for square 225).
... continued....
for index 2
4 = root*2 (constant equation). so then 1/4 = 0.25 (=another constant) * index of 2 = 0.5
So then 7 + ((root=8)*0.5 =4) + (index – 1 = 1) = 12.
for index 3
4 = root*2 (constant equation). So then (constant)0.25 * index of 3 = 0.75.
So then 7 + ((root=8)*0.75 = 6) +(index – 1 = 2) = 15
if linear index was 2, converted is 112 – 12 = 100
If linear index 3, converted value is 136 – 15 = 121
obviously you will eventually run out of decimal spaces for larger power of 4 square ranges. < 0.000125. You can make the numbers bigger, and then divide back down at the end to get correct numbers.
Also, must account for fractions of higher ranges when indexing “in between” the normal , which is very easy. If you wanted 89 square: 1/spread (ie 100 – 81)=19 *( 89 -81) = 8 then iterate. Good seed.