login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A075685 Reverse and Add! carried out in base 4; number of steps needed to reach a palindrome, or -1 if no palindrome is ever reached. 4
0, 0, 0, 0, 1, 0, 1, 2, 1, 1, 0, 1, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 2, 2, 0, 3, 2, 4, 0, 4, 3, 1, 1, 0, 1, 1, 1, 0, 4, 2, 3, 0, 2, 3, 4, 0, 4, 1, 2, 1, 0, 1, 2, 4, 0, 3, 2, 2, 0, 4, 3, 4, 0, 1, 0, 1, 2, 1, 1, 1, 2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 0, 1, 3, 1, 1, 1, 2, 2, 3, 3, 2, 1, 1, 1, 3, 1, 1, 1, 2, 2 (list; graph; refs; listen; history; internal format)
OFFSET

0,8

COMMENTS

Base 4 analogue of A033665 (base 10) and A066057 (base 2). For values of n such that presumably a(n) = -1 see A075420.

LINKS

Index entries for sequences related to Reverse and Add!

EXAMPLE

26 (decimal) = 122 -> 122 + 221 = 1003 -> 1003 + 3001 = 10010 -> 10010 + 01001 = 11011 (palindrome) = 325 (decimal) requires 3 steps, so a(26) = 3.

PROG

(ARIBAS) m := 105; stop := 1000; for n := 0 to m do c := 0; k := n; v := -1; while c < stop do a := k; rev := 0; while a > 0 do rev := 4*rev + (a mod 4); a := a div 4; end; if k = rev then v := c; c := stop; else inc(c); k := k + rev; end; end; write(v, " "); end; .

CROSSREFS

Cf. A014192, A033665, A066057, A075420.

Sequence in context: A060763 A131576 A100073 * A037906 A120936 A173432

Adjacent sequences:  A075682 A075683 A075684 * A075686 A075687 A075688

KEYWORD

base,nonn

AUTHOR

Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), Sep 24 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 17 16:39 EST 2012. Contains 206058 sequences.