cp's OEIS Frontend

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.

Showing 1-1 of 1 results.

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).

Original entry on oeis.org

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
Offset: 1

Views

Author

David A. Corneth, Apr 22 2016

Keywords

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

Examples

			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.
		

Crossrefs

Programs

  • 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 *)
Showing 1-1 of 1 results.