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.

A056965 a(n) = n - (reversal of digits of n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, -9, -18, -27, -36, -45, -54, -63, -72, 18, 9, 0, -9, -18, -27, -36, -45, -54, -63, 27, 18, 9, 0, -9, -18, -27, -36, -45, -54, 36, 27, 18, 9, 0, -9, -18, -27, -36, -45, 45, 36, 27, 18, 9, 0, -9, -18, -27, -36, 54, 45, 36, 27, 18, 9, 0, -9, -18, -27, 63, 54, 45, 36, 27, 18, 9, 0, -9, -18, 72, 63, 54
Offset: 0

Views

Author

Henry Bottomley, Jul 18 2000

Keywords

Comments

a(n) is a multiple of 9.

Examples

			a(17) = 17 - 71 = -54.
		

Crossrefs

Programs

  • Haskell
    a056965 n = n - a004086 n  -- Reinhard Zumkeller, Sep 17 2013
    
  • Maple
    a:= n-> (s-> n-parse(cat(s[-i]$i=1..length(s))))(""||n):
    seq(a(n), n=0..82);  # Alois P. Heinz, Jul 11 2021
  • Mathematica
    Table[n - FromDigits[Reverse[IntegerDigits[n]]], {n, 0, 82}] (* Jayanta Basu, Jul 11 2013 *)
  • PARI
    a(n) = n - fromdigits(Vecrev(digits(n))); \\ Michel Marcus, Dec 20 2023
  • Python
    def a(n): return n - int(str(n)[::-1]) # Osman Mustafa Quddusi, Jul 11 2021
    

Formula

a(n) = n - A004086(n) = 2*n - A056964(n).