login
Complement of A026430.
25

%I #26 Mar 01 2023 14:28:26

%S 2,4,7,11,13,17,20,22,25,29,32,34,38,40,43,47,49,53,56,58,62,64,67,71,

%T 74,76,79,83,85,89,92,94,97,101,104,106,110,112,115,119,122,124,127,

%U 131,133,137,140,142,146,148,151,155,157,161,164,166,169,173,176

%N Complement of A026430.

%H Winston de Greef, <a href="/A356133/b356133.txt">Table of n, a(n) for n = 1..5000</a>

%F a(n) = 3n - A001285(n-1) for n >= 1.

%e The partial sums of the Thue-Morse sequence A001285 = (1,2,2,1,2,1,1,...) are A026430 = (0,1,3,5,6,8,9,10,...), from which the missing positive integers are (2,4,7,11,...).

%t u = Accumulate[1 + ThueMorse /@ Range[0, 2^7]]; (* A026430 *)

%t Complement[Range[Max[u]], u] (* A356133 *)

%o (PARI) a(n) = 3*n - 1 - hammingweight(n-1)%2; \\ _Kevin Ryde_, Aug 04 2022

%o (Python)

%o def A356133(n): return 3*n-(2 if (n-1).bit_count()&1 else 1) # _Chai Wah Wu_, Mar 01 2023

%Y Cf. A001285, A007413, A026430, A036580, A091855, A036554, A091855, A354384.

%K nonn,easy

%O 1,1

%A _Clark Kimberling_, Aug 04 2022