OFFSET
1,1
COMMENTS
Leading zeros in the 9's complement are omitted.
For palindromes of the form 10^k-1 the corresponding entry is zero. Apart from this the entries are distinct.
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..25000
EXAMPLE
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
PROG
(Python)
# Program for generating the b-file
def a(n):
return 10**len(str(n))-n-1
i=0
j=1
while j<=250:
if i==int(str(i)[::-1]):
print(str(j)+" "+str(a(i)))
j+=1
i+=1 # Indranil Ghosh, Jan 30 2017
(Python)
def A084019(n):
if n == 1: return 9
y = 10*(x:=10**(len(str(n>>1))-1))
if n<x+y:
c = n-x
c = 10**len(str(c))-1-c
return c*x+int(str(c)[-2::-1]or 0)
else:
c = n-y
c = 10**len(str(c))-1-c
return c*y+int(str(c)[-1::-1]or 0) # Chai Wah Wu, Jun 13 2024
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 23 2003
STATUS
approved