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!)
A039638 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, 2, 11, 7, 7, 2, 5, 5, 23, 13, 29, 7, 2, 17, 2, 19, 41, 11, 3, 3, 3, 53, 13, 7, 31, 2, 17, 17, 37, 37, 19, 5, 83, 43, 89, 11, 47, 3, 3, 3, 13, 13, 113, 7, 29, 59, 7, 31, 2, 131, 67, 67, 17, 17, 17, 73, 19, 19, 19, 79, 41, 5, 173, 43, 11, 179, 11, 23, 47, 191 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
MATHEMATICA
see A039634.
Table[NestWhile[If[EvenQ[#], #/2, (#-1)/2]&, Prime[n]-1, CompositeQ], {n, 80}] (* Harvey P. Dale, May 27 2023 *)
PROG
(Haskell)
a039638 1 = 1
a039638 n = until ((== 1) . a010051) (flip div 2) (a000040 n - 1)
-- Reinhard Zumkeller, Nov 17 2013
CROSSREFS
Sequence in context: A368256 A185688 A203955 * A090926 A023503 A241195
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 19 08:45 EDT 2024. Contains 371782 sequences. (Running on oeis4.)