OFFSET
1,2
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
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
KEYWORD
nonn
AUTHOR
EXTENSIONS
Offset corrected by Reinhard Zumkeller, Nov 17 2013
STATUS
approved