As a thought exercise I decided to solve the problem using a different process to @idling, and the resulting solution uses one less story variable (thus slightly reducing the overall History) at the cost of the added the need to call a custom Javascript function.
NOTES: I am going make a couple of assumptions:
1. That the test for $Observant is 61 appearing twice in your example is an error.
2. That $Xpobs equals 0 (zero) when $Observant equals 59 (fifty-nine).
The value for $Observant and the 'difference' of $Xpobs both increase in a linear fashion which means that you can use maths (like that shown in the 'A tougher sequence' section of this page) to generate an quadratic polynomial function which can be used to determine the associated value of $Xpobs for each $Observant.
Breaking down your values for $Observant and $Xpobs gives a table like the following:
n 59 60 61 62 63 64 65
f(n) 0 5 11 18 26 35 45
diff 5 6 7 8 9 10
diff of diff 1 1 1 1 1
Which after a little consulting of the runes (and some simultaneous equation solving) we end up with the following algorithm:
$Xpobs = ($Observant² * 0.5) + ($Observant * -54.5) + 1475
The above can be turned into a usable function by adding Javascript code like the following to your project's Story Javascript area, it defines a setup.calcXpobs() function which you can use to calculate the Xpobs for a specific Observant.
setup.calcXpobs = function (observant) {
return (Math.pow(observant, 2) * 0.5) + (observant * -54.5) + 1475;
}
... and you can test that it produces the correct values using TwineScript like the following within a Passage.
<<nobr>>
<table>
<tr><th>Observant</th><th>Xpobs</th></tr>
<<for _i to 59; _i <= 70; _i++>>
<tr><td>_i</td><td><<= setup.calcXpobs(_i)>></td></tr>
<</for>>
</table>
<</nobr>>
Using the new function to determine when to increase the value of $Observant is as simple as:
<<if $Xpobs is setup.calcXpobs($Observant + 1)>><<set $Observant++>><</if>>