Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A060583
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A060583 A ternary code related to the Tower of Hanoi. +0
4
0, 2, 1, 7, 6, 8, 5, 4, 3, 23, 22, 21, 18, 20, 19, 25, 24, 26, 16, 15, 17, 14, 13, 12, 9, 11, 10, 70, 69, 71, 68, 67, 66, 63, 65, 64, 54, 56, 55, 61, 60, 62, 59, 58, 57, 77, 76, 75, 72, 74, 73, 79, 78, 80, 50, 49, 48, 45, 47, 46, 52, 51, 53, 43, 42, 44, 41, 40, 39, 36, 38, 37 (list; graph; listen)
OFFSET

0,2

COMMENT

Write n in base 3, then (working from left to right) if the k-th digit of n is equal to the corresponding digit to the left of the k-th digit of a(n) then this is the k-th digit of a(n), otherwise the k-th digit of a(n) is the element of {0,1,2} which has not just been compared, then read result as a base 3 number.

LINKS

Index entries for sequences that are permutations of the natural numbers

FORMULA

a(n) =3a([n/3])+((-a([n/3])-n) mod 3) =3a([n/3])+A060582(n) with a(0)=0.

EXAMPLE

a(46)=76 since in base 3 43 is written as 1201; this gives a first digit of 2(=3-1-0) for a(n), a second digit of 2(=2=2), a third digit of 1(=3-2-0) and a fourth digit of 1(=1=1); 2211 base 3 is 76.

CROSSREFS

Cf. A060586, A060587.

Sequence in context: A039814 A160201 A078301 this_sequence A078104 A072280 A086054

Adjacent sequences: A060580 A060581 A060582 this_sequence A060584 A060585 A060586

KEYWORD

base,nonn

AUTHOR

Henry Bottomley (se16(AT)btinternet.com), Apr 04 2001

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