The OEIS is supported by the many generous donors to the OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A192984 In repeated iterations of function m->m/3 if m == 0 (mod 3), m->4m+a if 4m+a == 0 (mod 3) where a = 1 or 2, a(n) is maximum value achieved if starting from n. 0

%I

%S 9,9,9,18,189,9,189,189,9,189,189,18,54,189,189,189,189,18,189,81,189,

%T 189,189,189,333,189,27,189,117,189,189,234,189,333,189,36,270,189,54,

%U 162,297,189,234,1017,189,333,189,189,198,270,189,378,909,54

%N In repeated iterations of function m->m/3 if m == 0 (mod 3), m->4m+a if 4m+a == 0 (mod 3) where a = 1 or 2, a(n) is maximum value achieved if starting from n.

%C Largest value of the trajectory in A194428 .

%C If a(n) exists (which is the conjecture of A194428) then a(n) must be a multiple of 9, since if a(n) is not divisible by 3 then the next iteration 4*a(n) + 1 or 4*a(n) + 2 would be greater than a(n), while if a(n) was divisible by 3 only once, a(n) = 3x -> x -> 4x+1 or 4x+2 is greater than 3x.

%e a(4)=18 since iteration starts: 4, 18, 6, 2, 9, 3, 1, 6,... and 18 is highest value.

%p with(numtheory):T:=array(1..2000):for n from 1 to 100 do: T:=n:n0:=n:k:=2:for it from 1 to 50 do: z:=irem(n0,3):if z=0 then n0:=n0/3:T[k]:=n0:k:=k+1:else n0:=4*n0 + 1:if irem(n0,3)=0 then T[k]:=n0:k:=k+1:else n0:=n0+1:T[k]:=n0:k:=k+1:fi:fi:od:U:=convert(T,set):n1:=nops(U):maxi:=0:for i from 1 to n1 do: if T[i]> maxi then maxi:=T[i]:else fi:od:printf(`%d, `, maxi):od:

%Y Cf. A194428.

%K nonn

%O 1,1

%A _Michel Lagneau_, Aug 25 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified May 23 16:11 EDT 2022. Contains 353976 sequences. (Running on oeis4.)