This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A224512 #13 Apr 23 2013 02:17:22 %S A224512 1,4,12,4,12,36,12,4,12,36,108,36,12,36,12,4,12,36,108,36,108,324,108, %T A224512 36,12,36,108,36,12,36,12,4,12,36,108,36,108,324,108,36,108,324,972, %U A224512 324,108,324,108,36,12,36,108,36,108,324,108,36,12,36,108 %N A224512 Gray code variant of A147582. %C A224512 A147582 is generated by using the binary weight of n, A000120 = wt(). %C A224512 Here instead, A224512 uses the Gray code weight, A005811 = gt(). %F A224512 a(1) = 1. For a(n)>1, a(n) = 4 * 3^(gt(n-1)-1). %e A224512 A003188(5-1) = 6 = 110 (base 2), so gt(5-1) = 2. Then a(5) = 12 = 4 * 3^1 = 12. %o A224512 (PARI) gt(n) = sum(kk=1, n, (-1)^((kk/2^valuation(kk, 2)-1)/2)); \\ from A005811. %o A224512 a(n) = if (n==1, 1, 4 * 3^(gt(n-1)-1)); \\ _Michel Marcus_, Apr 22 2013 %Y A224512 Cf. A147582, A224513. %K A224512 nonn %O A224512 1,2 %A A224512 _Gary W. Adamson_, Apr 08 2013