%I #14 Mar 30 2022 06:17:07
%S 0,2,1,6,2,10,3,14,4,18,5,22,6,44,7,66,8,88,9,110,10,42,11,55,12,77,
%T 13,99,14,121,15,62,16,66,17,88,18,110,19,132,20,82,21,86,22,99,23,
%U 121,24,143,25,102,26,106,27,110,28,132,29,154,30,122,31,126,32,130,33,143,34,165,35,142,36,146,37,150,38,154,39,176,40,162,41,166,42,170,43,174,44,187,45
%N a(n) = n/2 if n is even, otherwise n + A004186(n), where A004186 = arrange digits in decreasing order.
%C A variant of the Collatz (3x+1) map A006370. See A352540 - A352543 for more about iterations of this map.
%H Eric Angelini, <a href="https://mailman.xmission.com/hyperkitty/list/math-fun@mailman.xmission.com/thread/RI5P2MYI7NKD32LK47XTYTGUAEMQKVVZ/">Divide by 2 or add the biggest anagram</a>, math-fun discussion list, Mar 20 2022
%o (PARI) apply( {A352544(n)=if(n%2,n+A004186(n),n\2)}, [0..90]) \\ with A004186(n)=fromdigits(vecsort(digits(n),,4))
%Y Cf. A004186.
%Y Coincides with A064680 (half if even, double if odd) for n < 13.
%Y Cf. A352540 (initial values with infinite orbit under A352544), A352541 (number of iterations of A352544 to reach a value for the second time), A352542 (orbit of 89 under A352544), A352543 (numbers that end in a loop of length > 3 under A352544), A352545 (representatives of loops of length > 3).
%K nonn,base
%O 0,2
%A _Eric Angelini_ and _M. F. Hasler_, Mar 20 2022