A356133 Complement of A026430.
2, 4, 7, 11, 13, 17, 20, 22, 25, 29, 32, 34, 38, 40, 43, 47, 49, 53, 56, 58, 62, 64, 67, 71, 74, 76, 79, 83, 85, 89, 92, 94, 97, 101, 104, 106, 110, 112, 115, 119, 122, 124, 127, 131, 133, 137, 140, 142, 146, 148, 151, 155, 157, 161, 164, 166, 169, 173, 176
Offset: 1
Examples
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,...).
Links
- Winston de Greef, Table of n, a(n) for n = 1..5000
Programs
-
Mathematica
u = Accumulate[1 + ThueMorse /@ Range[0, 2^7]]; (* A026430 *) Complement[Range[Max[u]], u] (* A356133 *)
-
PARI
a(n) = 3*n - 1 - hammingweight(n-1)%2; \\ Kevin Ryde, Aug 04 2022
-
Python
def A356133(n): return 3*n-(2 if (n-1).bit_count()&1 else 1) # Chai Wah Wu, Mar 01 2023
Formula
a(n) = 3n - A001285(n-1) for n >= 1.