OFFSET

1,13

COMMENTS

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.

LINKS

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

EXAMPLE

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

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

PROG

(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

CROSSREFS

KEYWORD

nonn,base,easy

AUTHOR

David A. Corneth, Jun 23 2017

STATUS

approved