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.

A084019 a(n) = 9's complement of n-th palindrome (A002113).

Original entry on oeis.org

9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 88, 77, 66, 55, 44, 33, 22, 11, 0, 898, 888, 878, 868, 858, 848, 838, 828, 818, 808, 797, 787, 777, 767, 757, 747, 737, 727, 717, 707, 696, 686, 676, 666, 656, 646, 636, 626, 616
Offset: 1

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), May 23 2003

Keywords

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.

Examples

			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
		

Crossrefs

Programs

  • 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 nChai Wah Wu, Jun 13 2024