Pandigital Fraction

Author

Eric W. Weisstein
March 30, 2006

This notebook downloaded from http://mathworld.wolfram.com/notebooks/NumberTheory/PandigitalFraction.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/PandigitalFraction.html.

©2006 Wolfram Research, Inc. except for portions noted otherwise

Additional Authors

Code courtesy of Ed Pegg, June 14, 2002.

Initialization

PandigitalFractions[k_]:=Module[{t,n},t=Table[{FromDigits[Sort[Flatten[IntegerDigits/@{n,k n}]]],n},{n,9999}];
First/@Position[t,123456789]
]

Computation

Timing[p=Table[PandigitalFractions[n],{n,12}];]

Counts

Length/@p

Table

Table[{n,Table[HoldForm[nn/d]/.{nn->p[[n,i]],d->(n p[[n,i]])},{i,Length[p[[n]]]}]},{n,12}]//ColumnForm

1/2

p[[2]]

HoldForm[#]/(2#)&/@p[[2]]

ReleaseHold[%]