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.

A285953 Positions of 0 in A285952; complement of A285954.

This page as a plain text file.
%I A285953 #11 Nov 18 2024 07:35:23
%S A285953 3,5,8,12,14,18,21,23,26,30,33,35,39,41,44,48,50,54,57,59,63,65,68,72,
%T A285953 75,77,80,84,86,90,93,95,98,102,105,107,111,113,116,120,123,125,128,
%U A285953 132,134,138,141,143,147,149,152,156,158,162,165,167,170,174,177
%N A285953 Positions of 0 in A285952; complement of A285954.
%C A285953 Conjecture: 3n - a(n) is in {0, 1} for n >= 1.
%C A285953 Proof of the conjecture: Let t = A010060 be the Thue-Morse sequence. Every pair t(2n-1),t(2n) is either 01 or 10.  Since 01 and 10 map to 110 and 101 under the transform, which both have length 3, it follows that a(n) = 3n-1+t(2n) for n=1,2,..., and so certainly 3n - a(n) is 0 or 1. - _Michel Dekking_, Jan 05 2018
%H A285953 Clark Kimberling, <a href="/A285953/b285953.txt">Table of n, a(n) for n = 1..10000</a>
%F A285953 a(n) = 3n-1 + A010060(2n) - _Michel Dekking_, Jan 05 2018
%e A285953 As a word, A285952 = 110101101110101..., in which 0 is in positions  3,5,8,12,...
%t A285953 s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {1, 0}}] &, {0}, 7]  (* Thue-Morse, A010060 *)
%t A285953 w = StringJoin[Map[ToString, s]]
%t A285953 w1 = StringReplace[w, {"0" -> "1", "1" -> "10"}]  (* A285952, word *)
%t A285953 st = ToCharacterCode[w1] - 48 (* A285952, sequence *)
%t A285953 Flatten[Position[st, 0]]  (* A285953 *)
%t A285953 Flatten[Position[st, 1]]  (* A285954 *)
%o A285953 (Python)
%o A285953 def A285953(n): return 3*n-(((n<<1)-1).bit_count()&1^1) # _Chai Wah Wu_, Nov 18 2024
%Y A285953 Cf. A010060, A005614, A285950, A285952, A285954.
%K A285953 nonn,easy
%O A285953 1,1
%A A285953 _Clark Kimberling_, May 05 2017