%I #43 Dec 11 2025 22:01:07
%S 11,431,2081,2683,3169,4663,25841,26591,76031,92569,127033,158227,
%T 158293,158449,186481,204019,213067,218513,221539,291437,294313,
%U 397013,419351,426841,510481,551443,591937,594203,609313,671303,677227,756227,782137,822667,854353
%N Prime-indexed primes that are the average of the preceding and following prime-indexed primes.
%C Middle terms of three consecutive prime-indexed primes that form an arithmetic progression.
%H Andrew Howroyd, <a href="/A391116/b391116.txt">Table of n, a(n) for n = 1..10000</a>
%F Terms q(k) such that 2*q(k) = q(k-1) + q(k+1) where q(n) = prime(prime(n)) = A006450(n).
%e 11 is a term because A006450 contains 5, 11, 17 and 11 = (5 + 17) / 2.
%e 431 is a term because A006450 contains 419, 431, 443 and 431 = (419 + 443) / 2.
%t With[{pip = Prime[Prime[Range[10000]]]}, pip[[1 + Position[Differences[pip, 2], 0] // Flatten]]] (* _Amiram Eldar_, Dec 01 2025 *)
%o (Python)
%o from sympy import prime
%o def pip(n):
%o return prime(prime(n))
%o def equidistant_pips(max_k=10000):
%o terms = []
%o indices = []
%o q_prev = pip(1)
%o q_curr = pip(2)
%o for k in range(2, max_k):
%o q_next = pip(k + 1)
%o if q_curr - q_prev == q_next - q_curr:
%o terms.append(q_curr)
%o indices.append(k)
%o q_prev, q_curr = q_curr, q_next
%o return terms, indices
%o (PARI) lista(n)={my(L=List(), k=0, q=0, r=0); forprime(p=2, oo, k++; if(isprime(k), if(p-q==q-r, listput(L, q); if(#L==n, break)); r=q; q=p)); Vec(L)} \\ _Andrew Howroyd_, Nov 29 2025
%Y Subsequence of A006450, similar to A006562.
%K nonn
%O 1,1
%A _Bruce Nye_, Nov 29 2025