This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A039640 #13 Aug 08 2025 03:19:30 %S A039640 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, %T A039640 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, %U A039640 131,67,17,5,5,71,73,5,5,5,79,83,11,173,11,11,179,23,47,3,191,97,13 %N A039640 Fixed point of "k -> k/2 or (k+1)/2 until result is prime", starting with prime(n)-1. %H A039640 Reinhard Zumkeller, <a href="/A039640/b039640.txt">Table of n, a(n) for n = 1..10000</a> %t A039640 (* See A039635. *) %o A039640 (Haskell) %o A039640 a039640 1 = 1 %o A039640 a039640 n = until ((== 1) . a010051) (flip div 2 . (+ 1)) (a000040 n - 1) %o A039640 -- _Reinhard Zumkeller_, Nov 17 2013 %Y A039640 Cf. A039634-A039645. %Y A039640 Cf. A010051, A000040, A039644, A039638, A039635. %K A039640 nonn %O A039640 1,2 %A A039640 _Wouter Meeussen_ %E A039640 Offset corrected by _Reinhard Zumkeller_, Nov 17 2013