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!)
A035524 Reverse and add (in base 4). 7
1, 2, 4, 5, 10, 20, 25, 50, 85, 170, 340, 425, 850, 1385, 3070, 6140, 10225, 15335, 29410, 65135, 129070, 317675, 1280860, 2163725, 3999775, 7999550, 20321515, 81946460, 138412045, 255852575, 511705150, 1300234475, 5242880860 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
LINKS
FORMULA
a(n+1) = A055948(a(n)), a(0) = 1. [Reinhard Zumkeller, Oct 10 2011]
MATHEMATICA
nxt4[n_]:=Module[{idn4=IntegerDigits[n, 4]}, FromDigits[idn4+ Reverse[idn4], 4]]; NestList[nxt4, 1, 40] (* Harvey P. Dale, May 02 2011 *)
PROG
(Haskell)
a035524 n = a035524_list !! n
a035524_list = iterate a055948 1
-- Reinhard Zumkeller, Oct 10 2011
(Python)
def reversedigits(n, b=10): # reverse digits of n in base b
....x, y = n, 0
....while x >= b:
........x, r = divmod(x, b)
........y = b*y + r
....return b*y + x
A035524_list, l = [1], 1
for _ in range(50):
....l += reversedigits(l, 4)
....A035524_list.append(l)
CROSSREFS
Cf. A035522.
Cf. A030103.
Sequence in context: A161706 A128401 A018467 * A018283 A249398 A018489
KEYWORD
nonn,easy,nice,base
AUTHOR
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org), Sep 22 2000
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 03:30 EDT 2024. Contains 371782 sequences. (Running on oeis4.)