The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 9
1, 3, 7, 15, 11, 23, 35, 27, 19, 39, 43, 31, 51, 55, 63, 59, 47, 71, 75, 67, 79, 87, 91, 103, 99, 95, 83, 111, 107, 119, 135, 127, 147, 115, 139, 123, 131, 143, 155, 159, 167, 179, 183, 151, 163, 171, 175, 187, 195, 191, 203, 219, 227, 231, 215, 207, 239, 243, 211 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Second term onwards rearrangement of odd numbers of the type 4n+3.
LINKS
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
Cf. A086518.
Sequence in context: A333556 A334782 A102032 * A346296 A332374 A152677
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jul 30 2003
EXTENSIONS
More terms from David Wasserman, Mar 10 2005
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 29 05:22 EDT 2024. Contains 372921 sequences. (Running on oeis4.)