This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A178942 #27 May 21 2020 10:58:34 %S A178942 3,5,11,13,17,19,29,37,47,53,61,67,71,79,83,131,137,151,163,173,233, %T A178942 277,331,359,379,397,401,419,439,773,823,941,947,1021,1031,1033,1063, %U A178942 1087,1097,1117,1123,1153,1187,1237,1277,1709,1789,1823 %N A178942 a(1) = 3; for n >= 2, a(n) is the smallest prime q > a(n-1) such that, for the previous prime p and the following prime r, the fraction (q-p)/(r-q) has denominator equal to A001223(n)/2 (or 0, if no such prime exists). %C A178942 Conjecture: a(n) > 0 for all n. %C A178942 The smallest prime(k) > a(n-1) such that the denominator of A001223(k-1)/A001223(k) equals A001223(n)/2. - _R. J. Mathar_, Jan 07 2011 %p A178942 A001223 := proc(n) ithprime(n+1)-ithprime(n) ; end proc: %p A178942 A178942 := proc(n) option remember; local p,q,r ; if n = 1 then 3; else for q from procname(n-1)+1 do if isprime(q) then p := prevprime(q) ; r := nextprime(q) ; denom((q-p)/(r-q)) ; if % = A001223(n)/2 then return q; end if; end if; end do: end if; end proc: # _R. J. Mathar_, Jan 07 2011 %t A178942 A001223[n_] := Prime[n + 1] - Prime[n]; %t A178942 a[n_] := a[n] = Module[{p, q, r, d}, If[n == 1, 3, For[q = a[n - 1] + 1, True, q++, If [PrimeQ[q], p = NextPrime[q, -1]; r = NextPrime[q]; d = Denominator[(q - p)/(r - q)]; If[d == A001223[n]/2, Return[q]]]]]]; %t A178942 Array[a, 48] (* _Jean-François Alcover_, May 21 2020, after Maple *) %Y A178942 Cf. A001223, A168253, A179210, A179234, A179240, A179328. %K A178942 nonn %O A178942 1,1 %A A178942 _Vladimir Shevelev_, Jan 06 2011 %E A178942 More terms from _Alois P. Heinz_, Jan 06 2011