login
Binary expansion of the constant x where a(n) = 2 - A391813(n-1) for n >= 1, and A391813 is the continued fraction of x starting with A391813(0) = 1.
3

%I #15 Jan 05 2026 10:00:00

%S 1,0,1,1,0,0,0,1,1,0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,0,1,1,0,0,1,0,1,0,1,

%T 0,0,1,0,1,0,0,0,0,0,1,1,1,0,0,1,0,1,0,1,0,0,1,0,1,0,1,1,0,1,0,1,0,0,

%U 0,1,0,1,1,1,0,0,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,0,0,1,1,0,1,1,1,0,0

%N Binary expansion of the constant x where a(n) = 2 - A391813(n-1) for n >= 1, and A391813 is the continued fraction of x starting with A391813(0) = 1.

%C This is an example of a constant which has a simple continued fraction expansion with the same parity as its binary expansion.

%H Paul D. Hanna, <a href="/A391814/b391814.txt">Table of n, a(n) for n = 1..5000</a>

%e x = 1.3867505068375175679941682578045223324514... (A391812).

%e This binary expansion of x begins (offset 1)

%e [1,0,1,1,0,0,0,1,1,0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,0,1,

%e 1,0,0,1,0,1,0,1,0,0,1,0,1,0,0,0,0,0,1,1,1,0,0,1,0,

%e 1,0,1,0,0,1,0,1,0,1,1,0,1,0,1,0,0,0,1,0,1,1,1,0,0,

%e 1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,0,0,1,1,0,1,1,1,0,0,

%e 0,0,1,0,0,0,0,1,0,1,1,1,1,0,1,1,1,0,0,0,1,0,0,1,0,

%e 0,1,0,0,0,0,1,1,1,0,1,1,0,1,1,0,0,1,1,1,0,0,0,1,0,

%e 0,0,0,1,0,1,0,1,1,0,0,1,1,0,1,0,1,0,1,0,1,0,1,1,1,

%e 0,0,1,0,1,1,1,0,0,1,1,1,0,1,1,1,0,1,1,0,0,1,1,0,0, ...]

%e Compare with the continued fraction of x (offset 0)

%e A391813 = [1;2,1,1,2,2,2,1,1,2,2,2,2,2,2,1,2,2,2,2,1,2,1,2,2,1,

%e 1,2,2,1,2,1,2,1,2,2,1,2,1,2,2,2,2,2,1,1,1,2,2,1,2,

%e 1,2,1,2,2,1,2,1,2,1,1,2,1,2,1,2,2,2,1,2,1,1,1,2,2,

%e 1,2,2,2,2,1,2,1,1,1,1,1,1,1,1,2,2,1,1,2,1,1,1,2,2,

%e 2,2,1,2,2,2,2,1,2,1,1,1,1,2,1,1,1,2,2,2,1,2,2,1,2,

%e 2,1,2,2,2,2,1,1,1,2,1,1,2,1,1,2,2,1,1,1,2,2,2,1,2,

%e 2,2,2,1,2,1,2,1,1,2,2,1,1,2,1,2,1,2,1,2,1,2,1,1,1,

%e 2,2,1,2,1,1,1,2,2,1,1,1,2,1,1,1,2,1,1,2,2,1,1,2,2, ...].

%e to see that a(n) = 2 - A391813(n-1) for n >= 1.

%o (PARI) \\ must set appropriate precision and value of N

%o {N = 100; r = sqrt(2); for(i=1, N, B = binary(r); C2 = vector(#B[2], k, 2 - B[2][k]); C = concat(1, C2); M = contfracpnqn(C); r = M[1, 1]/M[2, 1]*1.); C}

%Y Cf. A391812 (decimal expansion), A391813 (continued fraction).

%Y Cf. A391872.

%K nonn,base

%O 1

%A _Paul D. Hanna_, Dec 30 2025