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

Exponents k such that the binary expansion of 3^k has an even number of ones.
2

%I #15 Apr 25 2024 06:35:33

%S 1,2,3,5,6,8,9,12,14,17,18,21,23,24,25,26,27,31,32,33,35,37,38,39,40,

%T 42,44,45,47,51,52,55,57,58,59,60,61,64,70,71,72,73,74,75,76,77,78,79,

%U 81,96,99,102,104,105,106,109,112,116,127,131,132,133,134,135,136

%N Exponents k such that the binary expansion of 3^k has an even number of ones.

%H Hugo Pfoertner, <a href="/A371970/b371970.txt">Table of n, a(n) for n = 1..10000</a>

%p q:= n-> is(add(i, i=Bits[Split](3^n))::even):

%p select(q, [$0..150])[]; # _Alois P. Heinz_, Apr 24 2024

%t Select[Range[136], EvenQ@ DigitCount[3^#, 2, 1] &] (* _Michael De Vlieger_, Apr 24 2024 *)

%o (PARI) is_a371970(k) = hammingweight(3^k)%2 == 0

%Y Complement of A223024.

%Y Cf. A000120, A000244, A001969, A011754, A078839.

%K nonn,base,easy

%O 1,2

%A _Hugo Pfoertner_, Apr 24 2024