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.

A156703 String of digits encountered in decimal expansion of successive ratios k/(k+1), treating only non-repeating expansions, with decimal point and leading and trailing zeros removed.

Original entry on oeis.org

5, 75, 8, 875, 9, 9375, 95, 96, 96875, 975, 98, 984375, 9875, 99, 992, 9921875, 99375, 995, 996, 99609375, 996875, 9975, 998, 998046875, 9984, 9984375, 99875, 999, 9990234375, 9992, 99921875, 999375, 9995, 99951171875, 9996, 999609375, 99968, 9996875, 99975
Offset: 1

Views

Author

Bill McEachen, Feb 13 2009

Keywords

Comments

The sequence seems infinite and may be volatile in its extrema.
Conjecture: subsets of the sequence (as it fills out) will correspond to the odd integers by length.
Thus, there are 3 single-digit entries in range {1-9}, ending at 9; 5 two-digit entries in range {10-99} ending at 99; 7 three-digit entries in range {100-999} ending at 999, etc. The remainder set of course are all repeating decimals.
Denominators of the ratios that yield each term must be terms of A003592 (i.e., any integer m whose distinct prime factors p also divide 10, or m regular to 10), since only these denominators produce non-repeating decimal expansions. - Michael De Vlieger, Dec 30 2015

Examples

			1/2 = 0.5 (non-repeating), which yields a(1) = 5.
2/3 = 0.6666... (repeating, so does not yield a term in the sequence).
3/4 = 0.75 (non-repeating), which yields a(2) = 75.
4/5 = 0.8 (non-repeating), which yields a(3) = 8.
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Sixth Edition, Oxford University Press, 2008, pages 141-144 (including Theorem 135).

Crossrefs

Cf. A003592, A158911. See comment at A158911.

Programs

  • Maple
    N:= 10^5: # to get terms for denominators <= N
    B:= sort([seq(seq(2^i*5^j,i=0..ilog2(N/5^j)),j=0..ilog(N,5))]):
    seq(10^max(padic:-ordp(n,2),padic:-ordp(n,5))*(n-1)/n, n=B[2..-1]); # Robert Israel, Dec 29 2015
  • Mathematica
    FromDigits@ First@ # & /@ RealDigits@ Apply[#1/#2 &, Transpose@ {# - 1, #} &@ Select[Range@ 10000, AllTrue[First /@ FactorInteger@ #, MemberQ[{2, 5}, #] &] &], 1] (* Michael De Vlieger, Dec 30 2015, Version 10 *)
    FromDigits@ First@# & /@ RealDigits@ Apply[#1/#2 &, Transpose@ {# - 1, #} &@ Select[Range@ 10000, First@ Union@ Map[MemberQ[{2, 5}, #] &, First /@ FactorInteger@ #] &], 1] (* Michael De Vlieger, Dec 30 2015, Version 6 *)
  • PARI
    list(maxx)={my(N, vf=List()); maxx++;for(n=0, log(maxx)\log(5),
    N=5^n; maxVal= 0;while(N<=maxx, if (N != 1, listput(vf, (N-1)/N));
    N<<=1;)); vf = vecsort(Vec(vf));for (i=1,length(vf),
    while(denominator(vf[i]) != 1, vf[i] *= 10););print(vf);}
    \\ adapted from A158911 code, courtesy Michel Marcus, Dec 29 2015
    
  • Python
    import string,copy
    from decimal import *
    getcontext().prec = 200
    maxx=1000
    n=1
    maxLen=0
    while nmaxCnt and match>1:
                        if len(subStr)==1 and z4:
                pass
            else:
                print(ratio[2:])
            getcontext().prec = max(2*subLen,200)
        n+=1
    # Bill McEachen, Dec 28 2015

Formula

a(n) = 10^d*(k-1)/k where k = A003592(n+1) = 2^i*5^j and d=max(i,j). - Robert Israel, Dec 29 2015