A224513 Gray code variant of A147562.
1, 5, 17, 21, 33, 69, 81, 85, 97, 133, 241, 277, 289, 325, 337, 341, 353, 389, 497, 533, 641, 965, 1073, 1109, 1121, 1157, 1265, 1301, 1313, 1349, 1361, 1365, 1377, 1413, 1521, 1557, 1665, 1989, 2097, 2133, 2241, 2565, 3537, 3861, 3969, 4293, 4401, 4437, 4449
Offset: 0
Keywords
Examples
a(4) = 21 = (1 + 4 + 12 + 4), where (1, 4, 12, 4, ...) are the first four terms of A224512.
Programs
-
PARI
gt(n) = sum(kk=1, n, (-1)^((kk/2^valuation(kk, 2)-1)/2)); \\ from A005811. a(n) = if (n==0, 1, 1 + 4*sum(k=1, n, 3^(gt(k)-1))); \\ Michel Marcus, Apr 22 2013
Comments