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 A085909 #26 Feb 16 2025 08:32:50 %S A085909 0,5,11,13,17,19,29,37,31,41,47,43,59,67,53,61,71,73,79,101,83,97,131, %T A085909 359,103,107,109,137,127,293,163,151,149,181,179,157,167,193,173,233, %U A085909 191,241,197,223,227,211,467,229,239,277,251,269,283,257,263,271,281 %N A085909 Smallest prime p>prime(n) such that p+prime(n+1)-prime(n) is the next prime after p; or a(n)=0 if no such prime exists. %C A085909 A001223(n) = A001223(A049084(a(n))); a(A001359(n)) = A001359(n+1); conjecture: a(n) > 0 for n > 1 (implies the twin prime conjecture). - _Reinhard Zumkeller_, Jan 26 2004 %C A085909 For n > 1, a(n) >= prime(n+1) and a(n) = prime(n+1) if prime(n+1) is a balanced prime (A006562). - _Zak Seidov_, Jun 03 2015 %H A085909 Zak Seidov, <a href="/A085909/b085909.txt">Table of n, a(n) for n = 1..10000</a> %H A085909 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PrimeDifferenceFunction.html">Prime Difference Function</a> %t A085909 a[1] = 0; a[n_] := For[p = Prime[n+1]; d = p - Prime[n], True, p = q, q = NextPrime[p]; If[d == q - p, Return[p]]]; (* _Jean-François Alcover_, Feb 24 2015 *) %o A085909 (MATLAB) P = primes(5000); A = zeros(1, length(P));D = P(2:end) - P(1:(length(P) - 1)); for i = 2:2:(max(D));f = find(D == i); A(f(1:(length(f) - 1))) = P(f(2:end));end;A(2:100) % _David Wasserman_, Jan 26 2004 %Y A085909 Cf. A085910, A001223, A049084, A001359, A006562. %K A085909 nonn %O A085909 1,2 %A A085909 _Amarnath Murthy_, Jul 09 2003 %E A085909 More terms from _Reinhard Zumkeller_ and _David Wasserman_, Jan 26 2004 %E A085909 Edited by _N. J. A. Sloane_, Oct 21 2008 at the suggestion of _R. J. Mathar_