OFFSET
1,1
COMMENTS
a(n) necessarily is the first odd term in any Collatz trajectory in which it occurs.
LINKS
FORMULA
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.
EXAMPLE
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).
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).
PROG
(PARI)
oddsteps(n)={my(s=0); while(n!=1, if(n%2, n=(3*n+1); s++); n/=2); s}
a(n)={forstep(k=3, oo, 6, if(oddsteps(k)==n, return(k)))} \\ Andrew Howroyd, Dec 19 2021
(PARI) oddsteps(n)=my(s); while(n>1, n+=n>>1+1; if(!bitand(n, 1), n >>= valuation(n, 2)); s++); s
first(n)=my(v=vector(n), r=n, t); forstep(k=3, oo, 6, t=oddsteps(k); if(t<=n && v[t]==0, v[t]=k; if(r-- == 0, return(v)))) \\ Charles R Greathouse IV, Dec 22 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Johannes M.V.A. Koelman, Dec 03 2021
STATUS
approved
