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.

A381707 Smallest initial value for unimodal Collatz (3x+1)/2 glide sequence that begins with exactly n increases.

Original entry on oeis.org

5, 3, 23, 15, 95, 575, 383, 255, 5631, 25599, 104447, 69631, 745471, 3293183, 2195455, 12648447, 97910783, 65273855, 43515903, 1460666367, 6700400639, 4466933759, 71697432575, 47798288383, 764873277439, 1242923270143, 3760646520831, 8371159695359, 5580773130239, 3720515420159
Offset: 1

Views

Author

David Dewan, Mar 04 2025

Keywords

Comments

A unimodal Collatz glide sequence is successive rises x -> (3x+1)/2 followed by successive falls x -> x/2 until dropping below its starting x.
After n increases, there are ceiling(n*log(3)/log(2) - n) decreases to drop below the initial value.

Examples

			For n=3, the smallest starting x = a(3) = 23 has trajectory
  23 - 35 -> 53 ->  80  -> 40 -> 20
     \-----------/      \------/
     n=3 increases   decreases to < initial
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=2^n ModularInverse[3^n,2^Max[Ceiling[Log2[3^n]-n],2]]-1; Array[a,30]
  • PARI
    a(n)={my(m=2^(logint(3^n,2) - n + 1 + (n==1))); 2^n*lift(1/Mod(3^n,m)) - 1} \\ Andrew Howroyd, Mar 09 2025

Formula

a(n) = 2^n * (3^(-n) mod 2^max(2, ceiling(log2(3^n)-n))) - 1.