A128857 a(n) = least number m beginning with 1 such that the quotient m/n is obtained merely by shifting the leftmost digit 1 of m to the right end.
1, 105263157894736842, 1034482758620689655172413793, 102564, 102040816326530612244897959183673469387755, 1016949152542372881355932203389830508474576271186440677966
Offset: 1
Examples
a(4) = 102564 since this is the smallest number that begins with 1 and which is divided by 4 when the first digit 1 is made the last digit (102564/4 = 25641).
Links
- A. V. Chupin, Table of n, a(n) for n=1..101
- G. P. Michon, Integers that are divided by k if their digits are rotated left.
Crossrefs
Minimal numbers for shifting any digit from the left to the right (not only 1) are in A097717.
By accident, the nine terms of A092697 coincide with the first nine terms of the present sequence. - N. J. A. Sloane, Apr 13 2009
Programs
-
Mathematica
(*Moving digits a:*) Give[a_,n_]:=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)]; Table[Give[1,n],{n,101}]
-
Python
from sympy import n_order def A128857(n): return n*(10**n_order(10,(m:=10*n-1))-1)//m # Chai Wah Wu, Apr 09 2024
Extensions
Edited by N. J. A. Sloane, Apr 13 2009
Code and b-file corrected by Ray Chandler, Apr 29 2009
Comments