login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A004086 Read n backwards (referred to as R(n) in many sequences). 366
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 11, 21, 31, 41, 51, 61, 71, 81, 91, 2, 12, 22, 32, 42, 52, 62, 72, 82, 92, 3, 13, 23, 33, 43, 53, 63, 73, 83, 93, 4, 14, 24, 34, 44, 54, 64, 74, 84, 94, 5, 15, 25, 35, 45, 55, 65, 75, 85, 95, 6, 16, 26, 36, 46, 56, 66, 76, 86, 96, 7, 17, 27, 37, 47 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

Also called digit reversal of n.

Leading zeros (after the reversal has taken place) are omitted. - N. J. A. Sloane, Jan 23 2017

For n>0: a(a(n)) = n iff n mod 10 != 0. - Reinhard Zumkeller, Mar 10 2002

LINKS

Franklin T. Adams-Watters and Indranil Ghosh, Table of n, a(n) for n = 0..50000 (first 1001 terms from Franklin T. Adams-Watters)

FORMULA

a(n) = d(n,0) with d(n,r) = if n=0 then r else d(floor(n/10),r*10+(n mod 10)). - Reinhard Zumkeller, Mar 04 201.

a(n) = Sum_{k=0,floor(log10(n))}(floor(n/10^k)-10*floor(n/10^(k + 1)))*10^(floor(log10(n))-k). - José de Jesús Camacho Medina, Mar 21 2014

a(n) = Sum_{m=0..floor(log_10(n))} (((floor(n/10^m)) mod 10) *10^(floor(log_10(n))-m)), n > 0. - Timothy Hopper, Jun 11 2015.

a(10*n+x) = x*10^m + a(n) if 10^(m-1) <= n < 10^m and 0 <= x <= 9. - Robert Israel, Jun 11 2015

MAPLE

read transforms; A004086 := digrev; #cf "Transforms" link at bottom of page

A004086:=proc(n) local s, t; if n<10 then n else s:=irem(n, 10, 't'); while t>9 do s:=s*10+irem(t, 10, 't') od: s*10+t fi end; # M. F. Hasler, Jan 29 2012

MATHEMATICA

Table[FromDigits[Reverse[IntegerDigits[n]]], {n, 0, 75}]

PROG

(PARI) dig(n) = {local(m=n, r=[]); while(m>0, r=concat(m%10, r); m=floor(m/10)); r}

A004086(n) = {local(b, m, r); r=0; b=1; m=dig(n); for(i=1, matsize(m)[2], r=r+b*m[i]; b=b*10); r} \\ Michael B. Porter, Oct 16 2009

(PARI) A004086(n)=eval(concat(Vecrev(Str(n)))) \\ M. F. Hasler, Nov 11 2010, updated May 11 2015

(Haskell) a004086 = read . reverse . show  -- Reinhard Zumkeller, Apr 11 2011

(Python)

def A004086(n):

....return int(str(n)[::-1]) # Chai Wah Wu, Aug 30 2014

CROSSREFS

Cf. A004185, A004186, A009996, A073138, A188649, A030101-A030108, A221714.

Sequence in context: A107603 A161594 A084011 * A121760 A061816 A083960

Adjacent sequences:  A004083 A004084 A004085 * A004087 A004088 A004089

KEYWORD

nonn,base,nice,look

AUTHOR

N. J. A. Sloane

EXTENSIONS

Extended by Ray Chandler, Dec 30 2004

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified November 22 09:35 EST 2017. Contains 295076 sequences.