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.
%I A084019 #24 Jun 14 2024 01:49:09 %S A084019 9,8,7,6,5,4,3,2,1,0,88,77,66,55,44,33,22,11,0,898,888,878,868,858, %T A084019 848,838,828,818,808,797,787,777,767,757,747,737,727,717,707,696,686, %U A084019 676,666,656,646,636,626,616 %N A084019 a(n) = 9's complement of n-th palindrome (A002113). %C A084019 Leading zeros in the 9's complement are omitted. %C A084019 For palindromes of the form 10^k-1 the corresponding entry is zero. Apart from this the entries are distinct. %H A084019 Indranil Ghosh, <a href="/A084019/b084019.txt">Table of n, a(n) for n = 1..25000</a> %e A084019 The 20th palindromic number A002113(20) is 101 having 9's complement 898 (999 - 101 = 898). So a(20) = 898. - _Indranil Ghosh_, Jan 30 2017 %o A084019 (Python) %o A084019 # Program for generating the b-file %o A084019 def a(n): %o A084019 return 10**len(str(n))-n-1 %o A084019 i=0 %o A084019 j=1 %o A084019 while j<=250: %o A084019 if i==int(str(i)[::-1]): %o A084019 print(str(j)+" "+str(a(i))) %o A084019 j+=1 %o A084019 i+=1 # _Indranil Ghosh_, Jan 30 2017 %o A084019 (Python) %o A084019 def A084019(n): %o A084019 if n == 1: return 9 %o A084019 y = 10*(x:=10**(len(str(n>>1))-1)) %o A084019 if n<x+y: %o A084019 c = n-x %o A084019 c = 10**len(str(c))-1-c %o A084019 return c*x+int(str(c)[-2::-1]or 0) %o A084019 else: %o A084019 c = n-y %o A084019 c = 10**len(str(c))-1-c %o A084019 return c*y+int(str(c)[-1::-1]or 0) # _Chai Wah Wu_, Jun 13 2024 %Y A084019 Cf. A002113, A061601, A084020. %K A084019 base,easy,nonn %O A084019 1,1 %A A084019 _Amarnath Murthy_ and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 23 2003