OFFSET
1,1
COMMENTS
Largest value of the trajectory in A194428 .
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.
EXAMPLE
a(4)=18 since iteration starts: 4, 18, 6, 2, 9, 3, 1, 6,... and 18 is highest value.
MAPLE
with(numtheory):T:=array(1..2000):for n from 1 to 100 do: T[1]:=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:
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Aug 25 2011
STATUS
approved