OFFSET
1,2
COMMENTS
Second term onwards rearrangement of odd numbers of the type 4n+3.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
PROG
(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
(Haskell)
import Data.List (delete)
a086517 n = a086517_list !! (n-1)
a086517_list = 1 : f 1 [3, 5 ..] where
f x zs = g zs where
g (y:ys) = if a010051' ((x + y) `div` 2) == 1
then y : f y (delete y zs) else g ys
-- Reinhard Zumkeller, Jun 30 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jul 30 2003
EXTENSIONS
More terms from David Wasserman, Mar 10 2005
STATUS
approved