login
Positions of 1 in A286922; complement of A286923.
3

%I #12 Nov 04 2024 07:32:15

%S 1,2,4,5,6,8,9,10,11,13,14,15,17,18,19,20,22,23,24,26,27,28,30,31,32,

%T 33,35,36,37,39,40,41,42,44,45,46,48,49,50,52,53,54,55,57,58,59,61,62,

%U 63,64,66,67,68,70,71,72,73,75,76,77,79,80,81,83,84,85

%N Positions of 1 in A286922; complement of A286923.

%C a(n) - a(n-1) is in {1,2} for n>=2, and a(n)/n -> 2 - sqrt(1/2).

%H Clark Kimberling, <a href="/A286924/b286924.txt">Table of n, a(n) for n = 1..10000</a>

%F From _Ridouane Oudra_, Nov 02 2024: (Start)

%F a(n) = floor((n+1)*r - 1), where r = 2 - sqrt(1/2).

%F a(n) = 2*n - floor((n+1)/sqrt(2)).

%F a(n) = 2*n - A049472(n+1). (End)

%e As a word, A286922 = 1101110111101110111101110..., in which 1 is in positions 1,2,4,5,6,8....

%p seq(floor((2-sqrt(1/2))*(n+1)-1), n=1..60); # _Ridouane Oudra_, Nov 02 2024

%t s = Nest[Flatten[# /. {0 -> 1, 1 -> {1, 1, 0}}] &, {1}, 7] (* A080764 *)

%t w = StringJoin[Map[ToString, s]]

%t w1 = StringReplace[w, {"0" -> "01"}]

%t st = ToCharacterCode[w1] - 48 ; (* A286922 *)

%t Flatten[Position[st, 0]]; (* A286923 *)

%t Flatten[Position[st, 1]]; (* A286924 *)

%Y Cf. A080764, A286922, A286923, A049472.

%K nonn,easy,changed

%O 1,2

%A _Clark Kimberling_, May 17 2017