# A set with lower density equal to $0$ and upper density different from $0$

Let $A\subseteq\mathbb N$, as usual we set $d^+(A)=\lim\sup_{n\rightarrow\infty}\frac{|A\cap[1,n]|}{n}$ and $d^{-}=\lim\inf_{n\rightarrow\infty}\frac{|A\cap[1,n]|}{n}$. It's very stardard that in general $d^+(A)\neq d^-(A)$. My question is little different: is there any $A$ for which $d^-(A)=0$ and $d^+(A)\neq0$? Equal to $1$?

-

For an explicit example, you could use $A= \{ n: \lfloor \log_2 \log_2{n} \rfloor \text{ is even} \}$.

-
Just rewrite the condition that $\lfloor log_2 log_2 n \rfloor =k$ as interval $[a,b]$for $n$ and note that the proportion $a/b$ is negligibly small. (The optional base 2 makes this calculation slightly nicer.) –  user11235 Apr 6 '11 at 11:40
many thanks. By the way, do you know a reference for the following result: for any real number r between $d^{-}(A)$ and $d^+(A)$ there is an invariant mean $f$ such that $f(\chi_A)=r$? It seems this is true, but I have not been able to find a reference so far –  Valerio Capraro Apr 6 '11 at 12:01

Yes of course. To construct $A$ throw in as many elements as needed to make $|A\cap [1,n]|/n$ within $\epsilon$ of 1, then leave out as many elements as needed to make $|A\cap [1,n]|/n$ within $\epsilon$ of 0. Repeat as you send $\epsilon \to 0$.

-

Here’s an explicit construction: let $A$ be the set of natural numbers $n$ such that $\lfloor\log\log n\rfloor$ is odd.

-
ok, yes, thank you, But why? It doesn't seem trivial to me! –  Valerio Capraro Apr 6 '11 at 11:18

Another explicit example: $A=\lbrace 1!,\dots,2!\rbrace\cup\lbrace 3!,\dots, 4!\rbrace\cup\lbrace 5!,\dots,6!\\rbrace\cup\dots$.

-