

A272215


a(n) = that number formed by permuting the digits of n which is divisible by the highest power of 2 (in case of a tie, choose the smallest number).


2



1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 12, 22, 32, 24, 52, 26, 72, 28, 92, 30, 13, 32, 33, 34, 35, 36, 37, 38, 39, 40, 14, 24, 34, 44, 54, 64, 74, 48, 94, 50, 15, 52, 35, 54, 55, 56, 57, 58, 59, 60, 16, 26, 36, 64, 56, 66, 76, 68, 96, 70, 17, 72, 37, 74, 57, 76, 77, 78, 79, 80, 18, 28, 38
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

There is no reason to allow permutations that begin with 0, because we can always gain a power of 2 by putting that zero at the other end.  N. J. A. Sloane, Apr 23 2016


LINKS

David A. Corneth, Table of n, a(n) for n = 1..10000


EXAMPLE

The numbers obtained by permuting the digits of 1336 are 1336, 1363, 1633, 3136, 3163, 6133, 3316, 3613, 6313, 3361, 3631 and 6331. The highest power of 2 dividing any of these is 2^6, which divides just one of them, 3136, so a(1336) = 3136.


MATHEMATICA

hp2[n_]:=Module[{c={#, IntegerExponent[#, 2]}&/@(FromDigits/@ Permutations[ IntegerDigits[ n]]), mx}, mx=Max[c[[All, 2]]]; Min[Select[c, #[[2]]==mx&][[All, 1]]]]; Array[hp2, 90] (* Harvey P. Dale, Jan 27 2020 *)


CROSSREFS

Cf. A261370, A272216.
Sequence in context: A167129 A328447 A107602 * A323366 A030066 A192438
Adjacent sequences: A272212 A272213 A272214 * A272216 A272217 A272218


KEYWORD

nonn,base,look


AUTHOR

David A. Corneth, Apr 22 2016


STATUS

approved



