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”).

Binary weight of A327973.
6

%I #8 Oct 05 2019 18:21:38

%S 2,4,5,6,7,8,9,13,11,13,13,14,17,18,19,23,20,23,24,27,26,24,23,30,31,

%T 29,29,31,36,35,36,37,35,34,35,42,40,46,41,50,54,48,52,47,47,53,47,51,

%U 51,54,48,51,60,55,56,64,61,60,59,68,71,67,65,78,64,63,68,72,70,74,79,89,85,77,85,76,79,83,78,90,97,82,87,81

%N Binary weight of A327973.

%H Antti Karttunen, <a href="/A328107/b328107.txt">Table of n, a(n) for n = 1..16384</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%H <a href="/index/Ce#cell">Index entries for sequences related to cellular automata</a>

%F a(n) = A000120(A327973(n)) = A000120(A110240(n) XOR 2*A110240(n-1)).

%o (PARI)

%o A269160(n) = bitxor(n, bitor(2*n, 4*n)); \\ From A269160.

%o A110240(n) = if(!n,1,A269160(A110240(n-1)));

%o A327973(n) = bitxor(A110240(n), 2*A110240(n-1));

%o A328107(n) = hammingweight(bitxor(A110240(n), 2*A110240(n-1)));

%o \\ Use this one for writing b-files:

%o A328107write(up_to) = { my(s=1, t, n=0); for(n=1,up_to, t = A269160(s); write("b328107.txt", n, " ", hammingweight(bitxor(2*s, t))); s = t); };

%Y Cf. A000120, A110240, A269160, A327973.

%Y Cf. also A070952, A328105, A328106, A328108, A328109.

%K nonn

%O 1,1

%A _Antti Karttunen_, Oct 05 2019