This is related to my other question here (that is, the terms of this sum are the reciprocals of that one).
Define a function $g(n)$ that takes the sum of the reciprocals of the difference between $n$ and all the primes below it. In other words,
$$g(n) = \sum_{k=1}^{\pi(n) - 1}\left(\frac{1}{n-p_{k}}\right),$$
where $p_k$ denotes the $k$th prime (with $2 = p_1$) and $\pi(n)$ is the number of primes less than or equal to $n$. For example,
$$g(12) = \frac{1}{12-11} + \frac{1}{12-7} + \frac{1}{12-5} + \frac{1}{12-3} + \frac{1}{12-2} = \frac{1}{1} + \frac{1}{5} + \frac{1}{7} + \frac{1}{9} + \frac{1}{10}\approx 1.55.$$
My question is this:
Is $g(n)$ bounded?
While investigating this function I've come up with some integer sequences that I haven't been able to find in OEIS. Primarily, the list of $n$ for which $g(n)$ is greater than any previous $n$ (I've computed up to $500,$$000$):
$$3, 4, 6, 8, 14, 20, 44, 74, 110, 200, 284, 620, 830, 1304, 1880, 2714, 3470, 5660, 9440, 65720, 69500, 81050, 88820, 113174, 284750...$$
Related, but not identical, to my original question is the question of whether this sequence continues infinitely or not. (That is, if it continues infinitely, $g(n)$ still may be bounded, but if it has a finite number of terms, $g(n)$ cannot be unbounded.) For reference, here's the list of $g(n)$ (rounded to the nearest thousandth unless the difference is smaller) associated with the above sequence:
$$0, 1.0, 1.5, 1.583, 1.7, 1.72, 1.845, 1.908, 1.984, 2.09, 2.123, 2.138, 2.177, 2.192, 2.247, 2.257, 2.2766, 2.2768, 2.341, 2.374, 2.388, 2.408, 2.444, 2.467, 2.521, 2.553...$$
All of the terms in the above sequence are $1$ more than a prime (the reason should be self-evident); here is the sequence of the indices of those primes (again, treating $2$ as $p_1$):
$$1, 2, 3, 4, 6, 8, 14, 21, 29, 46, 61, 114, 145, 213, 289, 396, 487, 746, 1170, 6567, 6902, 7935, 8605, 10727, 24824...$$
I can't find a pattern; even the gaps between them seem erratic (note the jump from $1170$ to $6567$ and then the small step to $6902$). How would I go about figuring this out?
Thanks for your help!