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.

A070837 Smallest number k such that abs(k - R(k)) = 9n, where R(k) is digit reversal of k (A004086); or 0 if no such k exists.

This page as a plain text file.
%I A070837 #23 May 15 2021 12:35:15
%S A070837 10,13,14,15,16,17,18,19,90,1011,100,0,0,0,0,0,0,0,0,1021,1090,103,0,
%T A070837 0,0,0,0,0,0,1031,1080,0,104,0,0,0,0,0,0,1041,1070,0,0,105,0,0,0,0,0,
%U A070837 1051,1060,0,0,0,106,0,0,0,0,1061,1050,0,0,0,0,107,0,0,0,1071,1040,0,0,0,0,0
%N A070837 Smallest number k such that abs(k - R(k)) = 9n, where R(k) is digit reversal of k (A004086); or 0 if no such k exists.
%C A070837 If 9n < 1000, k has at most 5 digits, and abs(k - R(k)) = 9n, then 10 must divide n. - _Sascha Kurz_, Jan 02 2003
%t A070837 a = Table[0, {50}]; Do[d = Abs[n - FromDigits[ Reverse[ IntegerDigits[n]]]] / 9; If[d < 51 && a[[d]] == 0, a[[d]] = n], {n, 1, 10^7}]; a
%o A070837 (Python)
%o A070837 def back_difference(n):
%o A070837     r = int(str(n)[::-1])
%o A070837     return abs(r-n)
%o A070837 def a070837(n):
%o A070837     i = 0
%o A070837     while True:
%o A070837         if back_difference(i)==9*n:
%o A070837             return i
%o A070837         i+=1
%o A070837 # _Christian Perfect_, Jul 23 2015
%Y A070837 Cf. A004086, A056965, A070838.
%K A070837 base,nonn
%O A070837 1,1
%A A070837 _Amarnath Murthy_, May 12 2002
%E A070837 More terms from _Sascha Kurz_, Jan 02 2003
%E A070837 a(21) corrected by _Christian Perfect_, Jul 23 2015