cp's OEIS Frontend

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.

A039641 Fixed point of "k -> k/2 or (k+1)/2 until result is prime", starting with prime(n)+1.

This page as a plain text file.
%I A039641 #15 Aug 08 2025 03:17:36
%S A039641 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,
%T A039641 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,
%U A039641 17,17,17,17,139,71,71,37,5,5,157,5,83,43,11,11,89,23,23,47,3,3,13
%N A039641 Fixed point of "k -> k/2 or (k+1)/2 until result is prime", starting with prime(n)+1.
%H A039641 Reinhard Zumkeller, <a href="/A039641/b039641.txt">Table of n, a(n) for n = 1..10000</a>
%t A039641 (* See A039635. *)
%t A039641 Table[NestWhile[If[EvenQ[#],#/2,(#+1)/2]&,n+1,!PrimeQ[#]&],{n,Prime[ Range[ 80]]}] (* _Harvey P. Dale_, May 12 2014 *)
%o A039641 (Haskell)
%o A039641 a039641 = until ((== 1) . a010051) (flip div 2 . (+ 1)) . (+ 1) . a000040
%o A039641 -- _Reinhard Zumkeller_, Nov 17 2013
%Y A039641 Cf. A039634-A039645.
%Y A039641 Cf. A010051, A000040, A039645, A039639, A039635.
%K A039641 nonn
%O A039641 1,1
%A A039641 _Wouter Meeussen_
%E A039641 Offset corrected by _Reinhard Zumkeller_, Nov 17 2013