Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A075685
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
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. +0
5
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; listen)
OFFSET

0,8

COMMENT

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.

PROGRAM

(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 this_sequence A037906 A120936 A101675

Adjacent sequences: A075682 A075683 A075684 this_sequence A075686 A075687 A075688

KEYWORD

base,nonn

AUTHOR

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

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 22 20:51 EST 2009. Contains 167312 sequences.


AT&T Labs Research