login
Number of (zeroless) pandigital fractions for 1/n.
11

%I #23 Jan 04 2024 18:54:44

%S 0,12,2,4,12,3,7,46,3,0,0,4,3,8,2,3,27,1,2,0,0,1,3,2,0,9,4,1,2,0,0,1,

%T 0,0,5,0,1,2,0,0,0,0,1,5,0,1,0,0,0,0,0,1,4,0,0,0,0,0,1,0,0,2,0,0,0,1,

%U 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

%N Number of (zeroless) pandigital fractions for 1/n.

%C a(n) is also the number of k such that k and n*k, taken together, are zeroless pandigital. - _Nathaniel Johnston_, Jun 25-26 2011

%C There are 179540 nonzero terms in the sequence. The largest n for which a(n) > 0 is 98765432 representing the pandigital fraction 1/98765432. The largest a(n) is a(8) = 46. - _Chai Wah Wu_, May 23 2015

%H Chai Wah Wu, <a href="/A054383/b054383.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PandigitalFraction.html">Pandigital Fraction</a>.

%e a(3)=2 since there are 2 such pandigital fractions for 1/3: 5823/17469 and 5832/17496.

%o (Python)

%o from itertools import permutations

%o l = {}

%o for d in permutations('123456789', 9):

%o ....for i in range(8):

%o ........s1, s2 = int(''.join(d[:i+1])), int(''.join(d[i+1:]))

%o ........q, r = divmod(s1,s2)

%o ........if not r:

%o ............if q in l:

%o ................l[q] += 1

%o ............else:

%o ................l[q] = 1

%o A054383_list = [0]*max(l)

%o for d in l:

%o ....A054383_list[d-1] = l[d] # _Chai Wah Wu_, May 23 2015

%Y Cf. A064160, A115927, A115929, A115930, A115931, A115932.

%K nonn,base

%O 1,2

%A _Eric W. Weisstein_

%E More terms from Vit Planocka (planocka(AT)mistral.cz), Sep 21 2003