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 A073756 #15 Dec 17 2024 22:50:44 %S A073756 1,3,2,2,2,19,1,19,1,1,18,1,1,18,3,1,12,3,1,9,15,3,8,3,3,17,77,3,5,6, %T A073756 3,9,2,2,2,31,8,11,2,5,2,11,69,34,2,17,14,2,16,33,7,8,2,14,2,1,5,1,76, %U A073756 2,8,5,4,76,1,8,2,4,30,1,1,2,10,30,1,1,4,10,7,1,10,4,1,7,33,10,1,1,16,33 %N A073756 Number of steps needed to reach a prime when the following map is repeatedly applied to n: if n is even then 2n + floor(log(n)) + 1, otherwise 2n - floor(log(n)) - 1; or -1 if no prime is ever reached. %H A073756 Sean A. Irvine, <a href="/A073756/b073756.txt">Table of n, a(n) for n = 2..1000</a> %o A073756 (UBASIC) %o A073756 10 cls %o A073756 30 for I=2 to 100 %o A073756 32 H=I %o A073756 40 if odd(H)=1 then goto 90 else goto 50 %o A073756 50 A=2*H+int(log(H))+1:K=K+1 %o A073756 60 if prmdiv(A)=A then print I,K:goto 120 %o A073756 65 if K>1000 then print I,0:goto 120 %o A073756 70 H=A:goto 40 %o A073756 90 A=2*H-int(log(H))-1:K=K+1 %o A073756 100 if prmdiv(A)=A then print I,K:goto 120 %o A073756 105 if K>1000 then print I,0:goto 120 %o A073756 110 H=A:goto 40 %o A073756 120 K=0 %o A073756 130 next %K A073756 easy,nonn %O A073756 2,2 %A A073756 _Felice Russo_, Sep 02 2002