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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A163326 Pick digits at the odd distance from the least significant end of the ternary expansion of n, then convert back to decimal. 6
0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 3, 3, 3, 4, 4, 4, 5, 5, 5, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 7, 7, 7, 8, 8, 8, 6, 6, 6, 7, 7, 7, 8, 8, 8, 6, 6, 6, 7, 7, 7, 8, 8, 8, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0, 1, 1, 1, 2, 2, 2, 0, 0, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,7

LINKS

A. Karttunen, Table of n, a(n) for n = 0..728

FORMULA

a(n) = A163325(floor(n/3))

a(n)=Sum_k>=0 {A030341(n,k)*b(k)} with (b) = (0,1,0,3,0,9,0,27,0,81,0,243,0,...) : powers of 3 alternating with zeros. - From Philippe Deléham, Oct 22 2011.

EXAMPLE

42 in ternary base (A007089) is written as '1120' (1*27 + 1*9 + 2*3 + 0), from which we pick the first and 3rd digits from the right (zero-based!), giving '12' = 1*3 + 2 = 5, thus a(42) = 5.

CROSSREFS

A059906 is an analogous sequence for binary. Note that A037314(A163325(n)) + 3*A037314(A163326(n)) = n for all n. Cf. A007089, A163327-A163329.

Sequence in context: A180834 A214458 A133873 * A028953 A037865 A039969

Adjacent sequences:  A163323 A163324 A163325 * A163327 A163328 A163329

KEYWORD

nonn,base

AUTHOR

Antti Karttunen, Jul 29 2009

EXTENSIONS

Edited by Charles R Greathouse IV, Nov 01 2009

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 19 04:40 EDT 2019. Contains 328211 sequences. (Running on oeis4.)