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 A381707 #40 Mar 18 2025 18:54:37 %S A381707 5,3,23,15,95,575,383,255,5631,25599,104447,69631,745471,3293183, %T A381707 2195455,12648447,97910783,65273855,43515903,1460666367,6700400639, %U A381707 4466933759,71697432575,47798288383,764873277439,1242923270143,3760646520831,8371159695359,5580773130239,3720515420159 %N A381707 Smallest initial value for unimodal Collatz (3x+1)/2 glide sequence that begins with exactly n increases. %C A381707 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. %C A381707 After n increases, there are ceiling(n*log(3)/log(2) - n) decreases to drop below the initial value. %H A381707 David Dewan, <a href="/A381707/a381707.pdf">Unimodal Glide Sequences</a> %F A381707 a(n) = 2^n * (3^(-n) mod 2^max(2, ceiling(log2(3^n)-n))) - 1. %e A381707 For n=3, the smallest starting x = a(3) = 23 has trajectory %e A381707 23 - 35 -> 53 -> 80 -> 40 -> 20 %e A381707 \-----------/ \------/ %e A381707 n=3 increases decreases to < initial %t A381707 a[n_]:=2^n ModularInverse[3^n,2^Max[Ceiling[Log2[3^n]-n],2]]-1; Array[a,30] %o A381707 (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 %Y A381707 Cf. A126241, A122437, A122458. %K A381707 nonn %O A381707 1,1 %A A381707 _David Dewan_, Mar 04 2025