Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A160652
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A160652 Express n in balanced ternary, then reverse the digits, leaving any trailing zeros alone +0
1
0, 1, -2, 3, 4, -11, -6, 7, -8, 9, 10, -5, 12, 13, -38, -33, 16, -29, -18, 25, -20, 21, 34, -35, -24, 19, -26, 27, 28, -17, 30, 37, -32, -15, 22, -23, 36, 31, -14, 39, 40, -119, -114, 43, -92, -99, 70, -65, 48, 97, -110, -87, 52, -83, -54, 79, -56, 75, 106, -101 (list; graph; listen)
OFFSET

0,3

COMMENT

This sequence, together with its negative extension a(-n) = -a(n) is a self-inverse permutation of the integers. The absolute values are a self-inverse permutation of the non-negative integers.

FORMULA

a(n)=A134028(n)*3^A007949(n). [From Franklin T. Adams-Watters (FrankTAW(AT)Netscape.net), May 24 2009]

EXAMPLE

87 in balanced ternary is 101(-1)0; leaving the final 0 and reversing the remaining digits gives (-1)1010, which is -51; so a(87) = -51.

PROGRAM

(PARI) a(n)=local(r, dr, q); if(n==0, 0, r=0; dr=1; while(n%3==0, dr*=3; n\=3); while(n!=0, q=(n+1)\3; r=3*r+dr*(n-3*q); n=q); r) [From Franklin T. Adams-Watters (FrankTAW(AT)Netscape.net), May 24 2009]

CROSSREFS

Cf. A065363, A117962, A117966.

Cf. A057889,A134028,A007949. [From Franklin T. Adams-Watters (FrankTAW(AT)Netscape.net), May 24 2009]

Sequence in context: A146027 A035358 A065633 this_sequence A131485 A075833 A117351

Adjacent sequences: A160649 A160650 A160651 this_sequence A160653 A160654 A160655

KEYWORD

base,sign

AUTHOR

Franklin T. Adams-Watters (FrankTAW(AT)Netscape.net), May 21 2009

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 27 14:50 EST 2009. Contains 167570 sequences.


AT&T Labs Research