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 A086517 #12 Jun 30 2015 14:26:33 %S A086517 1,3,7,15,11,23,35,27,19,39,43,31,51,55,63,59,47,71,75,67,79,87,91, %T A086517 103,99,95,83,111,107,119,135,127,147,115,139,123,131,143,155,159,167, %U A086517 179,183,151,163,171,175,187,195,191,203,219,227,231,215,207,239,243,211 %N A086517 a(1) = 1 and then the smallest odd number not included earlier such that the arithmetic mean of a pair of successive terms is prime. %C A086517 Second term onwards rearrangement of odd numbers of the type 4n+3. %H A086517 Reinhard Zumkeller, <a href="/A086517/b086517.txt">Table of n, a(n) for n = 1..10000</a> %o A086517 (PARI) v=[1];n=1;while(n<100,s=(n+v[#v])/2;if(type(s)=="t_INT",if(isprime(s)&&!vecsearch(vecsort(v),n),v=concat(v,n);n=0));n++);v \\ _Derek Orr_, Jun 16 2015 %o A086517 (Haskell) %o A086517 import Data.List (delete) %o A086517 a086517 n = a086517_list !! (n-1) %o A086517 a086517_list = 1 : f 1 [3, 5 ..] where %o A086517 f x zs = g zs where %o A086517 g (y:ys) = if a010051' ((x + y) `div` 2) == 1 %o A086517 then y : f y (delete y zs) else g ys %o A086517 -- _Reinhard Zumkeller_, Jun 30 2015 %Y A086517 Cf. A086518. %Y A086517 Cf. A259565, A259260, A259429, A259542, A010051, A005408. %K A086517 nonn %O A086517 1,2 %A A086517 _Amarnath Murthy_, Jul 30 2003 %E A086517 More terms from _David Wasserman_, Mar 10 2005