login
Numbers k such that there are equal numbers of 0's and 2's and equal numbers of 1's and 3's among the first k digits of the quaternary representation of Pi.
1

%I #11 Dec 21 2020 07:41:21

%S 0,4,386,398,2919434,2919644,2919648

%N Numbers k such that there are equal numbers of 0's and 2's and equal numbers of 1's and 3's among the first k digits of the quaternary representation of Pi.

%C The terms can also be interpreted as numbers k such that a walk on the square lattice governed by the quaternary digits of Pi is at the origin after k steps, where digit 0 corresponds to a step to the right, 1 to up, 2 to left, and 3 to down.

%C There are no more terms below 2*10^9.

%C There are two variations of this sequence, according to the directions each digit corresponds to. In A339450, 0=right, 1=left, 2=up, 3=down. For the case 0=right, 1=up, 2=down, 3=left, the only terms below 2*10^9 are 0, 2, 4, 8.

%e 4 is a term because the first four quaternary digits of Pi are 3, 0, 2, 1, one of each digit.

%e 386 is a term because among the first 386 digits there are 99 0's and 99 2's, and 94 1's and 94 3's.

%Y Cf. A004603, A039624, A339450.

%K nonn,base,more

%O 1,2

%A _Pontus von Brömssen_, Dec 05 2020