login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A224512 Gray code variant of A147582. 2
1, 4, 12, 4, 12, 36, 12, 4, 12, 36, 108, 36, 12, 36, 12, 4, 12, 36, 108, 36, 108, 324, 108, 36, 12, 36, 108, 36, 12, 36, 12, 4, 12, 36, 108, 36, 108, 324, 108, 36, 108, 324, 972, 324, 108, 324, 108, 36, 12, 36, 108, 36, 108, 324, 108, 36, 12, 36, 108 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
A147582 is generated by using the binary weight of n, A000120 = wt().
Here instead, A224512 uses the Gray code weight, A005811 = gt().
LINKS
FORMULA
a(1) = 1. For a(n)>1, a(n) = 4 * 3^(gt(n-1)-1).
EXAMPLE
A003188(5-1) = 6 = 110 (base 2), so gt(5-1) = 2. Then a(5) = 12 = 4 * 3^1 = 12.
PROG
(PARI) gt(n) = sum(kk=1, n, (-1)^((kk/2^valuation(kk, 2)-1)/2)); \\ from A005811.
a(n) = if (n==1, 1, 4 * 3^(gt(n-1)-1)); \\ Michel Marcus, Apr 22 2013
CROSSREFS
Sequence in context: A307874 A230057 A205124 * A010296 A084351 A286682
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Apr 08 2013
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 17 22:23 EDT 2024. Contains 371767 sequences. (Running on oeis4.)