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 A383046 #29 May 08 2025 06:50:39 %S A383046 11,7,175,287,2239,4223,19199,12799,52223,559103,372735,5840895, %T A383046 9486335,6324223,48955391,32636927,1095499775,730333183,11940134911, %U A383046 19413336063,35848716287,298777051135,932192452607,621461635071,6278369771519,4185579847679 %N A383046 Smallest initial value for shortcut form of the Collatz function (3x+1)/2 sequence that begins with exactly n-1 increases and decreases once before the last increment. %C A383046 Using shortcut form of the Collatz sequence, a(n) represents the residue class (mod 2^y) with y=floor(1+n*log(3)/log(2)) so that for x = a(n)+k*2^y, with k>=0, we have n-1 successive rises x -> (3x+1)/2 and one fall x -> x/2 before the last rise x -> (3x+1)/2 followed by successive falls x -> x/2 until dropping below its starting x. %F A383046 a(n) = 2^(n-1) * (3^(-n) mod 2^(floor(1+n*log2(3))+1-n)) - 1. %e A383046 For n=4, the residue class (mod 2^7) or smallest starting x = a(4) = 7 has trajectory %e A383046 7 - 11 -> 17 -> 26 -> 13-> 20 -> 10 -> 5 %e A383046 \-----------/ \--/ \------/ %e A383046 n-1=3 increases 1 decreases and 1 increases decreases to < initial %e A383046 For x = 135 = a(4) + 128 = 7 + 128 has trajectory %e A383046 135 - 203 -> 305 -> 458 -> 229-> 344 -> 172 -> 84 %e A383046 \-----------/ \--/ \------/ %e A383046 n-1=3 increases 1 decreases and 1 increases decreases to < initial %o A383046 (PARI) a(n)={my(y=floor(1+n*log(3)/log(2))+1-n); 2^(n-1)*lift(Mod(1/3^n, 2^y)) - 1} %Y A383046 Cf. A381707. %K A383046 nonn %O A383046 3,1 %A A383046 _V. Barbera_, Apr 20 2025