A115927 a(n) is the number of k such that k and n*k, taken together, are pandigital.
0, 48, 6, 8, 12, 0, 1, 16, 3, 0, 0, 1, 1, 6, 3, 1, 19, 6, 4, 12, 0, 3, 3, 4, 3, 9, 2, 1, 8, 2, 0, 16, 1, 3, 14, 0, 3, 7, 3, 4, 0, 3, 1, 13, 4, 1, 6, 0, 1, 12, 0, 2, 28, 1, 4, 6, 1, 3, 6, 3, 0, 28, 1, 1, 10, 1, 1, 4, 5, 7, 0, 3, 3, 11, 0, 2, 8, 1, 1, 46, 0, 0, 5, 3, 1, 7, 5, 6, 8, 3, 0, 13, 2, 3
Offset: 1
Examples
a(7)=1 since there is only one number, k=14076, such that k and 7*k=98532. a(9)=3 since there are 3 such numbers: 10638, 10647 and 10836.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..10000
Programs
-
Python
from itertools import permutations l = {} for d in permutations('0123456789', 10): if d[0] != '0': for i in range(9): if d[i+1] != '0': q, r = divmod(int(''.join(d[:i+1])),int(''.join(d[i+1:]))) if not r: if q in l: l[q] += 1 else: l[q] = 1 A115927_list = [0]*max(l) for d in l: A115927_list[d-1] = l[d] # Chai Wah Wu, May 24 2015
Comments