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!)
A039641 Fixed point of "k -> k/2 or (k+1)/2 until result is prime", starting with prime(n)+1. 4
3, 2, 3, 2, 3, 7, 5, 5, 3, 2, 2, 19, 11, 11, 3, 7, 2, 31, 17, 5, 37, 5, 11, 23, 13, 13, 13, 7, 7, 29, 2, 17, 5, 5, 19, 19, 79, 41, 11, 11, 23, 23, 3, 97, 13, 13, 53, 7, 29, 29, 59, 2, 61, 2, 17, 17, 17, 17, 139, 71, 71, 37, 5, 5, 157, 5, 83, 43, 11, 11, 89, 23, 23, 47, 3, 3, 13 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MATHEMATICA
see A039635.
Table[NestWhile[If[EvenQ[#], #/2, (#+1)/2]&, n+1, !PrimeQ[#]&], {n, Prime[ Range[ 80]]}] (* Harvey P. Dale, May 12 2014 *)
PROG
(Haskell)
a039641 = until ((== 1) . a010051) (flip div 2 . (+ 1)) . (+ 1) . a000040
-- Reinhard Zumkeller, Nov 17 2013
CROSSREFS
Sequence in context: A039639 A023509 A115041 * A198729 A093489 A066919
KEYWORD
nonn
AUTHOR
EXTENSIONS
Offset corrected by Reinhard Zumkeller, Nov 17 2013
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 April 23 18:16 EDT 2024. Contains 371916 sequences. (Running on oeis4.)