login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 3

%I #23 May 15 2021 12:35:15

%S 10,13,14,15,16,17,18,19,90,1011,100,0,0,0,0,0,0,0,0,1021,1090,103,0,

%T 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 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 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 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 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 (Python)

%o def back_difference(n):

%o r = int(str(n)[::-1])

%o return abs(r-n)

%o def a070837(n):

%o i = 0

%o while True:

%o if back_difference(i)==9*n:

%o return i

%o i+=1

%o # _Christian Perfect_, Jul 23 2015

%Y Cf. A004086, A056965, A070838.

%K base,nonn

%O 1,1

%A _Amarnath Murthy_, May 12 2002

%E More terms from _Sascha Kurz_, Jan 02 2003

%E a(21) corrected by _Christian Perfect_, Jul 23 2015

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 03:28 EDT 2024. Contains 371696 sequences. (Running on oeis4.)