login
Number of permutations without leading zeros of digits of n that have the same 2-adic valuation as n.
1

%I #27 Jun 16 2022 03:19:55

%S 1,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,2,1,2,1,1,1,1,1,1,2,1,1,1,1,2,1,1,1,

%T 2,1,2,1,2,1,1,1,1,1,1,1,1,1,1,1,2,1,2,1,1,1,2,1,2,1,1,2,1,1,1,1,1,1,

%U 1,1,2,1,2,1,2,1,1,1,2,1,1,1,1,1,1,1,1,1,1

%N Number of permutations without leading zeros of digits of n that have the same 2-adic valuation as n.

%C In searching for terms of A007602, one could search by product of digits; for example, numbers that have 6 as their product of digits include those whose digits consist only of one 6 and zero or more 1's and those that consist only of one 2, one 3, and zero or more 1's. 111132 is divisible by its product of digits. Knowing a(111132) might save some work in finding others like 311112. This idea holds for 5-smooth numbers; multiples of 7 need an extra trick.

%H David A. Corneth, <a href="/A288739/b288739.txt">Table of n, a(n) for n = 1..10000</a>

%e a(109) = 2. The permutations of digits 109 and 901 have the same 2-adic value and no leading zeros.

%e a(113) = 3 as the permutations of digits of 113 are 113, 131 and 311 all of which have the same 2-adic value as 113. - _David A. Corneth_, Jun 15 2022

%o (PARI) a(n) = { my(d = vecsort(digits(n)), v2 = valuation(n, 2), p, f, res = 0); forperm(d, p, p = Vec(p); if(p[1] != 0, f = fromdigits(p); res+=(valuation(f, 2) == v2); ) ); res } \\ _David A. Corneth_, Jun 15 2022

%Y Cf. A007602, A007814.

%K nonn,base,easy

%O 1,13

%A _David A. Corneth_, Jun 23 2017