OFFSET
2,2
COMMENTS
REFERENCES
S. Wolfram, A New Kind of Science, Wolfram Media Inc., (2002), p. 119.
LINKS
A. Karttunen, Table of n, a(n) for n = 2..12
A. Karttunen, C program for computing this sequence
FORMULA
EXAMPLE
When powers of 3 are written in binary (see A004656), under each other as:
000000000001 (1)
000000000011 (3)
000000001001 (9)
000000011011 (27)
000001010001 (81)
000011110011 (243)
001011011001 (729)
100010001011 (2187)
it can be seen that, starting from the column 2 from the right, the bits in the n-th column can be arranged in periods of 2^(n-1): 4, 8, ... This sequence is formed from those bits: 0011, reversed is 11100, which is binary for 12, thus a(3) = 12, 00011110, reversed is 011110000, which is binary for 120, thus a(4) = 120.
MAPLE
a(n) := sum( 'bit_n(3^i, n)*(2^i)', 'i'=0..(2^(n-1))-1);
bit_n := (x, n) -> `mod`(floor(x/(2^n)), 2);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Jan 29 1999. Entry revised Dec 29 2007.
STATUS
approved