Wolstenholme numbers The generalised harmonic number of order \$m\$ of \$n\$ is
$$H_{n,m} = \sum^n_{k=1} \frac 1 {k^m}$$
In this challenge, we'll be considering the generalised harmonic numbers of order \$2\$:
$$H_{n,2} = \sum^n_{k=1} \frac 1 {k^2}$$
This sequence begins \$1, \frac 5 4, \frac {49} {36}, \frac {205} {144}, \dots\$ and converges to \$\frac {\pi^2} 6\$ as \$n \to \infty\$.
However, we will only be considering the numerators of this sequence, which forms another sequence known as the Wolstenholme numbers (A007406):
1, 5, 49, 205, 5269, 5369, 266681, 1077749, 9778141, ...

You are to take a positive integer \$x\$ as input. \$x\$ is guaranteed to be a Wolstenholme number. You should output the next term in the sequence of Wolstenholme numbers, i.e. given the numerator of \$H_{n,2}\$, output the numerator of \$H_{n+1,2}\$
You may input and output in any convenient format. Your program should not fail due to floating point errors, meaning that attempts that calculate via the generalised harmonic numbers will be invalid if not using rational numbers. Your program should work theoretically for any valid input, but it is acceptable to fail for inputs that may be outside your language's integer maximum.
You may assume that no element is repeated in the sequence. If it turns out that there are any duplicate values in the Wolstenholme numbers sequence, any and all behaviour is acceptable when passed such values as input.
This is code-golf, so the shortest code in bytes wins
Test cases
        x -&gt;       out
        1 -&gt;         5
        5 -&gt;        49
       49 -&gt;       205
      205 -&gt;      5269
     5269 -&gt;      5369
     5369 -&gt;    266681
   266681 -&gt;   1077749
  1077749 -&gt;   9778141
  9778141 -&gt;   1968329
  1968329 -&gt; 239437889
239437889 -&gt; 240505109
J, 39 35 30 28 bytes
(]{~1+i.~)1*.[:+/\_2^~1+i.,]

Try it online!
-5 thanks to Bubbler's observation that the numerator is the LCM of the fraction and 1.
-2 thanks to Bubbler for a transformation.
Note: The approach below relies on the assumption that every Wolstenholme number is greater than or equal its index, which was kindly proved by Greg Martin.

[:+/\_2^~1+i.,] Generates the sequence up to n+1, where n is the input: Scan sum +/\ of 1 over 1% the square of *: one plus 1...+ the integers from 0 to the input i.@&gt;:.
1*. Numerators only.
(]{~1+i.~) Finds index of the input in previous result, adds 1, and plucks from previous result.