The OEIS is supported by the many generous donors to the OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A041013 Reverse or double: if reverse of a(n) > a(n), then a(n+1) = a(n) reversed, otherwise a(n+1) = 2*a(n). 1

%I #23 Aug 23 2023 19:49:48

%S 1,2,4,8,16,61,122,221,442,884,1768,8671,17342,24371,48742,97484,

%T 194968,869491,1738982,2898371,5796742,11593484,48439511,96879022,

%U 193758044,440857391,881714782,1763429564,4659243671,9318487342,18636974684,48647963681

%N Reverse or double: if reverse of a(n) > a(n), then a(n+1) = a(n) reversed, otherwise a(n+1) = 2*a(n).

%H Reinhard Zumkeller, <a href="/A041013/b041013.txt">Table of n, a(n) for n = 0..1000</a>

%t rd[n_]:=Module[{rev=FromDigits[Reverse[IntegerDigits[n]]]},If[ rev>n, rev, 2n]]; NestList[rd,1,40] (* _Harvey P. Dale_, Jan 25 2013 *)

%t NestList[If[IntegerReverse[#]>#,IntegerReverse[#],2#]&,1,40] (* _Harvey P. Dale_, Aug 23 2023 *)

%o a041013 n = a041013_list !! n

%o a041013_list = 1 : f 1 where

%o f x | rev <= x = (2*x) : f (2*x)

%o | otherwise = rev : f rev where rev = a004086 x

%o -- _Reinhard Zumkeller_, Aug 08 2011

%Y Cf. A004086.

%K base,nonn,nice

%O 0,2

%A _Dann Toliver_

%E Typo in definition corrected by K. Viswanathan Iyer, Mar 23 2010

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

Last modified June 20 10:31 EDT 2024. Contains 373516 sequences. (Running on oeis4.)