OFFSET
1,2
REFERENCES
R. Sprague, Recreation in Mathematics, Problem 21 pp. 17; 47-8 Dover NY 1963.
LINKS
A. V. Chupin, Table of n, a(n) for n=1..101
A. V. Chupin, Table of n, a(n) for n=1..154
EXAMPLE
We have a(5)=714285 since 714285/5=142857.
Likewise, a(4)=102564 since this is the smallest number followed by 205128, 307692, 410256, 512820, 615384, 717948, 820512, 923076, ... which all get divided by 4 when the first digit is made last.
MATHEMATICA
Min[Table[Block[{d=Ceiling[Log[10, n]], m=(10n-1)/GCD[10n-1, a]}, If[m!=1, While[PowerMod[10, d, m]!=n, d++ ], d=1]; ((10^(d+1)-1) a n)/(10n-1)], {a, 9}]] (* Anton V. Chupin (chupin(X)icmm.ru), Apr 12 2007 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Lekraj Beedassy, Sep 21 2004
EXTENSIONS
a(9) from Anton V. Chupin (chupin(X)icmm.ru), Apr 12 2007
Code and b-file corrected by Ray Chandler, Apr 29 2009
STATUS
approved