cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A128857 #19 Jun 30 2025 16:54:17
%S A128857 1,105263157894736842,1034482758620689655172413793,102564,
%T A128857 102040816326530612244897959183673469387755,
%U A128857 1016949152542372881355932203389830508474576271186440677966
%N 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.
%C A128857 a(n) is simply the decimal period of the fraction n/(10n-1). Thus, we have: n/(10n-1) = a(n)/(10^A128858(n)-1). With the usual convention that the decimal period of 0 is zero, that definition would allow the extension a(0)=0. a(n) is also the period of the decadic integer -n/(10n-1). - _Gerard P. Michon_, Oct 31 2012
%H A128857 A. V. Chupin, <a href="/A128857/b128857.txt">Table of n, a(n) for n=1..101</a>
%H A128857 G. P. Michon, <a href="http://www.numericana.com/answer/p-adic.htm#rol">Integers that are divided by k if their digits are rotated left</a>.
%e A128857 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).
%t A128857 (*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}]
%o A128857 (Python)
%o A128857 from sympy import n_order
%o A128857 def A128857(n): return n*(10**n_order(10,(m:=10*n-1))-1)//m # _Chai Wah Wu_, Apr 09 2024
%Y A128857 Minimal numbers for shifting any digit from the left to the right (not only 1) are in A097717.
%Y A128857 By accident, the nine terms of A092697 coincide with the first nine terms of the present sequence. - _N. J. A. Sloane_, Apr 13 2009
%K A128857 nonn,base
%O A128857 1,2
%A A128857 Anton V. Chupin (chupin(X)icmm.ru), Apr 12 2007
%E A128857 Edited by _N. J. A. Sloane_, Apr 13 2009
%E A128857 Code and b-file corrected by _Ray Chandler_, Apr 29 2009