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 A350082 #162 Jan 25 2022 09:36:16 %S A350082 1,3,0,5,7,0,9,9,0,11,19,0,17,37,0,17,19,0,25,23,0,25,27,0,33,29,0,37, %T A350082 33,0,41,75,0,37,41,0,43,39,0,41,109,0,57,51,0,47,55,0,57,133,0,57,55, %U A350082 0,73,57,0,59,123,0,63,109,0,75,115,0,89,181,0,71,73 %N A350082 Smallest odd number > n with n in its Collatz successors, or 0 if no such odd number exists. a(1) = 1. %C A350082 a(n) = 0 when n == 0 (mod 3) since such an n has no odd predecessor (only n*2^x). But n !== 0 (mod 3) always has some odd predecessor > n. %H A350082 Alois P. Heinz, <a href="/A350082/b350082.txt">Table of n, a(n) for n = 1..10000</a> %H A350082 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %e A350082 a(2) = 3, because 3 is the smallest odd number > 2 that has 2 as a successor: 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2. %e A350082 a(3) = 0 because 3 is not a successor of anything. A060565 contains no 3, nor multiples of 3. %e A350082 a(11) = 19, because the trajectories of 13, 15, 17 don't contain 11, and 11 is a successor of 19: %e A350082 13 -> 40..5 -> 16..1; %e A350082 15 -> 46..23 -> 70..35 -> 106..53 -> 160..5 -> 16..1; %e A350082 17 -> 52..13; %e A350082 19 -> 58..29 -> 88..11. %o A350082 (PARI) a(n)= if(1==n, return(1)); if(!(n%3), return(0)); my(v0=if(n%2, n+2, n+1)); while(1, my(v=v0); while(v>1 && v!=n, v=if(v%2, 3*v+1, v/2)); if(v==n, return(v0)); v0+=2) %Y A350082 Cf. A060565. %K A350082 nonn %O A350082 1,2 %A A350082 _Ruud H.G. van Tol_, Jan 22 2022