The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A285273 Number of integers, x, with n+1 digits, that have the property that there exists an integer k, with x <= k < 2*x, such that k/x = 1 + (x-10^n)/(10^n-1), i.e., the same digits appear in the denominator and in the recurring decimal. 2
 2, 4, 4, 8, 8, 32, 8, 32, 8, 32, 8, 128, 16, 32, 64, 128, 8, 256, 4, 256, 128, 128, 4, 1024, 64, 128, 32, 512, 64, 8192, 16, 4096, 64, 128, 256, 2048, 16, 16, 64, 4096, 32, 16384, 32, 2048, 512, 128, 8, 8192, 32, 2048, 256, 1024, 32, 4096, 512, 8192, 64, 512, 8 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS This was suggested by generalizing an exam question which asked "Jack typed a whole number into his calculator and divided by 154. The result was 1.545454545. What was his number?" It appears that a(n) is always a power of 2. LINKS EXAMPLE The number 154 has the property that there exists an integer, 238, for which      238/154 = 1 + 54/99 = 1.545454545... There are 4 three-digit values that give rise to a 2-digit recurring decimal:   100/100.0 = 1.0000000000000000   208/144.0 = 1.4444444444444444...   238/154.0 = 1.5454545454545454...   394/198.0 = 1.9898989898989898... thus a(2) = 4. For n=3, a(3) = 8:   10000/10000.0 = 1.0000000000000000   14938/12222.0 = 1.2222222222222222...   16198/12727.0 = 1.2727272727272727...   22348/14949.0 = 1.4949494949494949...   22648/15049.0 = 1.5049504950495049...   29830/17271.0 = 1.7271727172717271...   31600/17776.0 = 1.7776777677767776...   39994/19998.0 = 1.9998999899989998... MATHEMATICA a[n_] := Length@ List@ ToRules@ Reduce[k/x == 1 + (x-10^n)/(10^n-1) && 10^n <= x < 10^(n+1) && x <= k < 2 x, {k, x}, Integers]; Array[a, 20] (* for n<60, Giovanni Resta, Jun 30 2017 *) PROG (Python 3) from math import sqrt def is_square(n):   root = int(sqrt(n))   return root*root == n def find_sols(length):     count = 0     k=10**length     for n in range(k, 4*k-2):         discr= (2*k-1)*(2*k-1) - 4*(k*(k-1)-(k-1)*n)         if is_square(discr):             count+=1             b=(-(2*k-1)+sqrt(discr))/2             print(n, k+b, n/(k+b))     return count for i in range(8):     print(find_sols(i)) CROSSREFS Cf. A288781, A288782. Sequence in context: A248692 A048656 A107848 * A188824 A181212 A233394 Adjacent sequences:  A285270 A285271 A285272 * A285274 A285275 A285276 KEYWORD nonn,base AUTHOR James Kilfiger, Jun 14 2017 EXTENSIONS Definition corrected and a(11)-a(59) from Giovanni Resta, Jun 30 2017 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified October 16 01:52 EDT 2021. Contains 348034 sequences. (Running on oeis4.)