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 A349873 #60 Feb 08 2025 14:57:21 %S A349873 21,3,69,45,15,9,51,33,87,57,39,105,135,363,123,339,219,159,393,519, %T A349873 681,897,603,111,297,1581,1053,351,933,621,207,549,183,243,645,429, %U A349873 285,189,63,165,27,147,195,129,171,231,609,411,543,1449,975,327,873,1185,1527,1017 %N A349873 Smallest odd value such that any Collatz trajectory in which it occurs contains exactly n odd values other than '1'. %C A349873 a(n) necessarily is the first odd term in any Collatz trajectory in which it occurs. %H A349873 <a href="/index/3#3x1">Index entries for sequences related to 3x+1 (or Collatz) problem</a> %F A349873 a(n) mod 6 = 3 for all n>0. The odd multiples of 3 form the 'Garden-of-Eden' set (terms without a predecessor) under iterations of the reduced Collatz function A075677. %e A349873 a(1)=21 as 21 occurs solely in Collatz trajectories starting with 21*2^k, and these trajectories all contain one single odd value other than 1. No value smaller than 21 satisfies these requirements. In particular, a(1) does not equal 5 since 5 is part of Collatz trajectories that contain multiple odd values other than 1 (e.g., ...,13,40,20,10,5,16,8,4,2,1). %e A349873 a(2)=3 as 3 occurs solely in Collatz trajectories starting with 3*2^k, and these trajectories all contain exactly two odd values other than 1 (namely 3 and 5). %o A349873 (PARI) %o A349873 oddsteps(n)={my(s=0); while(n!=1, if(n%2,n=(3*n+1);s++); n/=2); s} %o A349873 a(n)={forstep(k=3, oo, 6, if(oddsteps(k)==n, return(k)))} \\ _Andrew Howroyd_, Dec 19 2021 %o A349873 (PARI) oddsteps(n)=my(s); while(n>1, n+=n>>1+1; if(!bitand(n,1), n >>= valuation(n,2)); s++); s %o A349873 first(n)=my(v=vector(n),r=n,t); forstep(k=3,oo,2, t=oddsteps(k); if(t<=n && v[t]==0, v[t]=k; if(r-- == 0, return(v)))) \\ _Charles R Greathouse IV_, Dec 22 2021 %Y A349873 Cf. A075677, A075680, A006667. %Y A349873 All terms are in A016945. %K A349873 nonn %O A349873 1,1 %A A349873 _Johannes M.V.A. Koelman_, Dec 03 2021