A359259 a(n) is the least k such that A359194(k) = A032766(n).
1, 0, 4, 9, 3, 8, 18, 7, 17, 6, 16, 37, 15, 36, 14, 35, 13, 34, 12, 33, 11, 32, 74, 31, 73, 30, 72, 29, 71, 28, 70, 27, 69, 26, 68, 25, 67, 24, 66, 23, 65, 22, 64, 149, 63, 148, 62, 147, 61, 146, 60, 145, 59, 144, 58, 143, 57, 142, 56, 141, 55, 140, 54, 139
Offset: 0
Examples
The first terms, alongside the binary expansions of A032766(n) and a(n), are: n a(n) bin(A032766(n)) bin(a(n)) -- ---- --------------- --------- 0 1 0 1 1 0 1 0 2 4 11 100 3 9 100 1001 4 3 110 11 5 8 111 1000 6 18 1001 10010 7 7 1010 111 8 17 1100 10001 9 6 1101 110 10 16 1111 10000 11 37 10000 100101
Programs
-
PARI
a(n) = { if (n<=1, return (1-n), n+=n\2; for (x=2+exponent(n), oo, my (k=bitneg(n,x)); if (k%3==0, return (k/3)))) }
Comments