login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A328108
Binary weight of A327976.
6
2, 4, 3, 6, 5, 12, 7, 11, 9, 13, 7, 12, 13, 20, 15, 23, 16, 19, 22, 25, 20, 28, 19, 30, 29, 39, 27, 29, 32, 37, 32, 37, 29, 38, 37, 38, 36, 44, 47, 44, 42, 46, 42, 53, 41, 49, 53, 47, 45, 58, 52, 55, 56, 65, 66, 60, 67, 56, 61, 64, 63, 77, 59, 66, 60, 67, 72, 72, 64, 84, 57, 81, 63, 79, 67, 92, 77, 77, 74, 80, 81, 88, 77
OFFSET
1,1
FORMULA
a(n) = A000120(A327976(n)).
a(n) = A000120(A110240(n) XOR 2*A265281(n-1)).
a(n) = A000120(A110240(n) XOR 2*A030101(A110240(n-1))).
PROG
(PARI)
A269160(n) = bitxor(n, bitor(2*n, 4*n)); \\ From A269160.
A110240(n) = if(!n, 1, A269160(A110240(n-1)));
A030101(n) = if(n<1, 0, subst(Polrev(binary(n)), x, 2));
A328108(n) = hammingweight(bitxor(A110240(n), 2*A030101(A110240(n-1))));
\\ Use this one for writing b-files:
A328108write(up_to) = { my(s=1, t, n=0); for(n=1, up_to, t = A269160(s); write("b328108.txt", n, " ", hammingweight(bitxor(2*A030101(s), t))); s = t); };
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 05 2019
STATUS
approved