TITLE: Arithmetically random bitstreams
QUESTION [5 upvotes]: Motivation (informal). When trying to generate a random bit-stream, we expect that "half of the" bits are $0$, and the "other half" are $1$. So, how about $010101\ldots$? Well, we would also expect that if we look at every second member of the sequence, then "half of" those bits are $0$ and the other half are $1$. So, let's make this precise.
Formal version. Let $\mathbb{N}$ denote the set of non-negative integers. We can identify every bit-stream, that is function $f:\mathbb{N}\to \{0,1\}$ with some $A\in{\cal P}(\mathbb{N})$ (take $A = f^{-1}(\{1\})$). 
Given any $S\subseteq \mathbb{N}$ we define maps $\mu_S^+, \mu_S^-:{\cal P}(\mathbb{N})\to[0,1]$ by $$\mu^{+}_S(A)= \lim \sup_{n\to\infty}\frac{|A\cap S \cap\{1,\ldots,n\}|}{1+|S\cap \{1,\ldots,n\}|}, \text{ and } \mu^{-}_S(A)= \lim \inf_{n\to\infty}\frac{|A\cap S \cap\{1,\ldots,n\}|}{1+|S\cap \{1,\ldots,n\}|}.$$
We say that $A$ is well-balanced with respect to $S$ if $\mu^+_S(A) = \mu^-_S(A) = 1/2$.
For $a,b\in \mathbb{N}$ with $a>0$ we set $S_{a,b} = \{an+b:n\in\mathbb{N}\}$ and we say that $A\in{\cal P}(\mathbb{N})$ is arithmetically random if $A$ is well-balanced with respect to $S_{a,b}$ for any $a,b\in\mathbb{N}$ with $a>0$.
What is an example of an arithmetically random set $A\in{\cal P}(\mathbb N)$?

REPLY [2 votes]: Mauduit and Sarkozy have studied essentially this and other related pseudorandomness measures for finite as well as infinite $\{\pm 1\}-$valued sequences, see here (not paywalled)and the references therein. 
Briefly, for a finite sequence $(e_1,\ldots, e_N)\in \{\pm 1\}^N$ of length $N,$ they define the well-distribution measure of the sequence by
$$
W(e_1,\ldots,e_N)=\max_{a,b,t \in \mathbb{N}} \left| \sum_{j=0}^{t-1} e_{a+jb} \right|
$$
where the maximum is taken over all AP's within 
$\{1,2,\ldots,N\}$.
Another measure they define is the correlation measure of order $k$
$$
C_k(e_1,\ldots,e_N)=\max_{M,0\leq d_1<d_2<\ldots<d_k} \left| 
\sum_{n=1}^M e_{n+d_1} e_{n+d_2} \cdots e_{n+d_k} 
\right|
$$
with $M+d_k\leq N.$ They prove that for any sequence,
$$
W(e_1,\ldots,e_N) \leq \sqrt{3 N C_2(e_1,\ldots,e_N)}
$$
while for almost all sequences in $\{\pm 1\}^N$ one has
$$
\sqrt{N} \ll C_2(e_1,\ldots,e_N) \ll \sqrt{N\log N}
$$
They also consider Champerpowne, Thue-Morse, and other sequences, with respect to these measures.