cp's OEIS Frontend

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.

A349873 Smallest odd value such that any Collatz trajectory in which it occurs contains exactly n odd values other than '1'.

Original entry on oeis.org

21, 3, 69, 45, 15, 9, 51, 33, 87, 57, 39, 105, 135, 363, 123, 339, 219, 159, 393, 519, 681, 897, 603, 111, 297, 1581, 1053, 351, 933, 621, 207, 549, 183, 243, 645, 429, 285, 189, 63, 165, 27, 147, 195, 129, 171, 231, 609, 411, 543, 1449, 975, 327, 873, 1185, 1527, 1017
Offset: 1

Views

Author

Keywords

Comments

a(n) necessarily is the first odd term in any Collatz trajectory in which it occurs.

Examples

			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).
		

Crossrefs

All terms are in A016945.

Programs

  • 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,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

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.