cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A356133 Complement of A026430.

This page as a plain text file.
%I A356133 #26 Mar 01 2023 14:28:26
%S A356133 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 A356133 74,76,79,83,85,89,92,94,97,101,104,106,110,112,115,119,122,124,127,
%U A356133 131,133,137,140,142,146,148,151,155,157,161,164,166,169,173,176
%N A356133 Complement of A026430.
%H A356133 Winston de Greef, <a href="/A356133/b356133.txt">Table of n, a(n) for n = 1..5000</a>
%F A356133 a(n) = 3n - A001285(n-1) for n >= 1.
%e A356133 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 A356133 u = Accumulate[1 + ThueMorse /@ Range[0, 2^7]]; (* A026430 *)
%t A356133 Complement[Range[Max[u]], u]  (* A356133 *)
%o A356133 (PARI) a(n) = 3*n - 1 - hammingweight(n-1)%2; \\ _Kevin Ryde_, Aug 04 2022
%o A356133 (Python)
%o A356133 def A356133(n): return 3*n-(2 if (n-1).bit_count()&1 else 1) # _Chai Wah Wu_, Mar 01 2023
%Y A356133 Cf. A001285, A007413, A026430, A036580, A091855, A036554, A091855, A354384.
%K A356133 nonn,easy
%O A356133 1,1
%A A356133 _Clark Kimberling_, Aug 04 2022