# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a288781 Showing 1-1 of 1 %I A288781 #16 Jul 02 2017 03:57:33 %S A288781 10,18,100,144,154,198,1000,1296,1702,1998,10000,12222,12727,14949, %T A288781 15049,17271,17776,19998,100000,104878,117343,122221,177777,182655, %U A288781 195120,199998,1000000,1005291,1038961,1142856,1148148,1181818,1187109,1208494,1318681 %N 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. %C A288781 The numbers appear to be in pairs that add up to 299...998; e.g., 144 + 154 = 298, 12222 + 17776 = 29998. %H A288781 Giovanni Resta, Table of n, a(n) for n = 1..10000 %t A288781 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 *) %o A288781 (Python 3) %o A288781 from math import sqrt %o A288781 def is_square(n): %o A288781 root = int(sqrt(n)) %o A288781 return root*root == n %o A288781 def find_sols(length): %o A288781 count = 0 %o A288781 k=10**length %o A288781 for n in range(k,4*k-2): %o A288781 discr= (2*k-1)*(2*k-1) - 4*(k*(k-1)-(k-1)*n) %o A288781 if is_square(discr): %o A288781 count+=1 %o A288781 b=(-(2*k-1)+sqrt(discr))/2 %o A288781 print(n, k+b, n/(k+b)) %o A288781 return count %o A288781 for i in range(8): %o A288781 print(find_sols(i)) %Y A288781 Cf. A285273, A288782 (numerators). %K A288781 nonn,base %O A288781 1,1 %A A288781 _James Kilfiger_, Jun 15 2017 %E A288781 Definition corrected by and more terms from _Giovanni Resta_, Jun 30 2017 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE