login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A056965
a(n) = n - (reversal of digits of n).
26
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,11
COMMENTS
a(n) is a multiple of 9.
FORMULA
a(n) = n - A004086(n) = 2*n - A056964(n).
EXAMPLE
a(17) = 17 - 71 = -54.
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 *)
PROG
(Haskell)
a056965 n = n - a004086 n -- Reinhard Zumkeller, Sep 17 2013
(Python)
def a(n): return n - int(str(n)[::-1]) # Osman Mustafa Quddusi, Jul 11 2021
(PARI) a(n) = n - fromdigits(Vecrev(digits(n))); \\ Michel Marcus, Dec 20 2023
CROSSREFS
KEYWORD
base,sign,look
AUTHOR
Henry Bottomley, Jul 18 2000
STATUS
approved