login
A039640
Fixed point of "k -> k/2 or (k+1)/2 until result is prime", starting with prime(n)-1.
4
1, 2, 2, 3, 5, 3, 2, 5, 11, 7, 2, 5, 5, 11, 23, 13, 29, 2, 17, 5, 5, 5, 41, 11, 3, 13, 13, 53, 7, 7, 2, 17, 17, 5, 37, 19, 5, 41, 83, 43, 89, 23, 3, 3, 13, 13, 53, 7, 113, 29, 29, 2, 2, 2, 2, 131, 67, 17, 5, 5, 71, 73, 5, 5, 5, 79, 83, 11, 173, 11, 11, 179, 23, 47, 3, 191, 97, 13
OFFSET
1,2
LINKS
MATHEMATICA
see A039635.
PROG
(Haskell)
a039640 1 = 1
a039640 n = until ((== 1) . a010051) (flip div 2 . (+ 1)) (a000040 n - 1)
-- Reinhard Zumkeller, Nov 17 2013
CROSSREFS
KEYWORD
nonn
EXTENSIONS
Offset corrected by Reinhard Zumkeller, Nov 17 2013
STATUS
approved