login
This site is supported by donations 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

Reinhard Zumkeller, Table of n, a(n) for n = 0..1000

MATHEMATICA

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

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: A263535 A018681 A018735 * A018754 A264980 A318151

Adjacent sequences:  A041010 A041011 A041012 * A041014 A041015 A041016

KEYWORD

base,nonn,nice

AUTHOR

Dann Toliver

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 14 12:02 EDT 2019. Contains 328004 sequences. (Running on oeis4.)