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 A303811 #21 Sep 15 2018 15:51:45 %S A303811 159,6,10,40,640,2560,40960,163840,2621440,167772160,671088640, %T A303811 42949672960,687194767360,2748779069440,43980465111040, %U A303811 2814749767106560,180143985094819840,720575940379279360,46116860184273879040,737869762948382064640,2951479051793528258560 %N A303811 Least k such that A006666(k)/A006667(k) = prime(n). %C A303811 A006666 and A006667 are respectively the number of halving and tripling steps in the '3x+1' problem. %C A303811 For n > 2, it seems that a(n) is of the form a(n) = 5*2^q with q = 1, 3, 7, 9, 13, 15, 19, 25, 27, 33, 37, 39, 43, 49, 55, 57, 63, 67, 69, ... (Numbers q such that q+4 is prime: A172367) %e A303811 a(4) = 40 because A006666(40)/A006667(40) = 7/1 = prime(4). %p A303811 nn:=10^20: %p A303811 for n from 1 to 10 do: %p A303811 ii:=0: %p A303811 for k from 1 to nn while(ii=0) do: %p A303811 it0:=0:it1:=0:m:=k: %p A303811 for i from 1 to nn while(m<>1) do: %p A303811 if irem(m, 2)=0 %p A303811 then %p A303811 m:=m/2:it0:=it0+1: %p A303811 else %p A303811 m:=3*m+1:it1:=it1+1: %p A303811 fi: %p A303811 od: %p A303811 if it1<>0 and it0/it1 = ithprime(n) %p A303811 then %p A303811 ii:=1:printf(`%d %d \n`,n,k): %p A303811 else %p A303811 fi: %p A303811 od: %p A303811 od: %Y A303811 Cf. A006577, A006666, A006667, A172367, A287798. %K A303811 nonn %O A303811 1,1 %A A303811 _Michel Lagneau_, Sep 10 2018