The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A004086 Read n backwards (referred to as R(n) in many sequences). 444

%I

%S 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,

%T 72,82,92,3,13,23,33,43,53,63,73,83,93,4,14,24,34,44,54,64,74,84,94,5,

%U 15,25,35,45,55,65,75,85,95,6,16,26,36,46,56,66,76,86,96,7,17,27,37,47

%N Read n backwards (referred to as R(n) in many sequences).

%C Also called digit reversal of n.

%C Leading zeros (after the reversal has taken place) are omitted. - _N. J. A. Sloane_, Jan 23 2017

%C For n>0: a(a(n)) = n iff n mod 10 != 0. - _Reinhard Zumkeller_, Mar 10 2002

%H Franklin T. Adams-Watters and Indranil Ghosh, <a href="/A004086/b004086.txt">Table of n, a(n) for n = 0..50000</a> (first 1001 terms from Franklin T. Adams-Watters)

%H Dana G. Korssjoen, Biyao Li, Stefan Steinerberger, Raghavendra Tripathi, and Ruimin Zhang, <a href="https://arxiv.org/abs/2012.04625">Finding structure in sequences of real numbers via graph theory: a problem list</a>, arXiv:2012.04625, Dec 08, 2020

%F a(n) = d(n,0) with d(n,r) = if n=0 then r, otherwise d(floor(n/10), r*10+(n mod 10)). - _Reinhard Zumkeller_, Mar 04 2010

%F 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

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

%p 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

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

%t IntegerReverse[Range[0,80]](* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, May 13 2018 *)

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

%o 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

%o (PARI) A004086(n)=fromdigits(Vecrev(digits(n))) \\ _M. F. Hasler_, Nov 11 2010, updated May 11 2015, Sep 13 2019

%o (Haskell) a004086 = read . reverse . show -- _Reinhard Zumkeller_, Apr 11 2011

%o (Python)

%o def A004086(n):

%o return int(str(n)[::-1]) # _Chai Wah Wu_, Aug 30 2014

%o (J) |.&.": i.@- 1e5 NB. _Stephen Makdisi_, May 14 2018

%Y Cf. A004185, A004186, A009996, A073138, A188649, A221714.

%Y Cf. A030101, A030102, A030103, A030104, A030105, A030107, A030108.

%K nonn,base,nice,look

%O 0,3

%A _N. J. A. Sloane_

%E Extended by _Ray Chandler_, Dec 30 2004

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

Last modified April 14 21:21 EDT 2021. Contains 342962 sequences. (Running on oeis4.)