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.

Showing 1-2 of 2 results.

A288781 Integers x with h+1 digits that have the property that there exists an integer k, with x <= k < 2*x, such that k/x = 1 + (x-10^h)/(10^h-1), i.e., the same digits appear in the denominator and in the recurring decimal.

Original entry on oeis.org

10, 18, 100, 144, 154, 198, 1000, 1296, 1702, 1998, 10000, 12222, 12727, 14949, 15049, 17271, 17776, 19998, 100000, 104878, 117343, 122221, 177777, 182655, 195120, 199998, 1000000, 1005291, 1038961, 1142856, 1148148, 1181818, 1187109, 1208494, 1318681
Offset: 1

Views

Author

James Kilfiger, Jun 15 2017

Keywords

Comments

The numbers appear to be in pairs that add up to 299...998; e.g., 144 + 154 = 298, 12222 + 17776 = 29998.

Crossrefs

Cf. A285273, A288782 (numerators).

Programs

  • Mathematica
    Union @@ Reap[Do[Sow[x /. 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]], {n, 6}]][[2, 1]] (* Giovanni Resta, Jun 30 2017 *)
  • Python
    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))

Extensions

Definition corrected by and more terms from Giovanni Resta, Jun 30 2017

A288782 Integers k that have the property that there exists an integer x with n+1 digits, such that 1 <= k/x < 2 and k/x = 1 + (x-10^n)/(10^n-1), i.e., the same digits appear in the denominator and in the recurring decimal.

Original entry on oeis.org

10, 34, 100, 208, 238, 394, 1000, 1680, 2898, 3994, 10000, 14938, 16198, 22348, 22648, 29830, 31600, 39994, 100000, 109994, 137694, 149380, 316048, 333630, 380720, 399994, 1000000, 1010610, 1079440, 1306120, 1318244, 1396694, 1409228, 1460458, 1738920, 1768810, 1826150
Offset: 1

Views

Author

James Kilfiger, Jun 15 2017

Keywords

Comments

The values 399..994 all seem to appear.

Crossrefs

Cf. A285273, A288781 (denominators).

Programs

  • Mathematica
    Union @@ Reap[ Do[Sow[k /. 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]], {n, 6}]][[2, 1]] (* Giovanni Resta, Jun 30 2017 *)
  • Python
    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))

Extensions

Definition corrected by Giovanni Resta, Jun 30 2017
Showing 1-2 of 2 results.