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

 

Logo
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
1, 2, 4, 8, 16, 61, 122, 221, 442, 884, 1768, 8671, 17342, 24371, 48742, 97484, 194968, 869491, 1738982, 2898371, 5796742, 11593484, 48439511, 96879022, 193758044, 440857391, 881714782, 1763429564, 4659243671, 9318487342, 18636974684, 48647963681 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
MATHEMATICA
rd[n_]:=Module[{rev=FromDigits[Reverse[IntegerDigits[n]]]}, If[ rev>n, rev, 2n]]; NestList[rd, 1, 40] (* Harvey P. Dale, Jan 25 2013 *)
NestList[If[IntegerReverse[#]>#, IntegerReverse[#], 2#]&, 1, 40] (* Harvey P. Dale, Aug 23 2023 *)
PROG
(Haskell)
a041013 n = a041013_list !! n
a041013_list = 1 : f 1 where
f x | rev <= x = (2*x) : f (2*x)
| otherwise = rev : f rev where rev = a004086 x
-- Reinhard Zumkeller, Aug 08 2011
CROSSREFS
Cf. A004086.
Sequence in context: A018681 A367172 A018735 * A018754 A264980 A318151
KEYWORD
base,nonn,nice
AUTHOR
EXTENSIONS
Typo in definition corrected by K. Viswanathan Iyer, Mar 23 2010
STATUS
approved

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)