After reading a blog entry on nilsequences, I wondered the about how many arithmetic progressions appear in nilsequences.

Let $f(n) = n \sqrt{2} \lfloor n \sqrt{3} \rfloor $. How often does $\Delta^3 f(n) = 0$ ? Some notes claim it vanishes 1/16 of the time.

In other words, does $$ \lim_{N \to \infty} \frac{\\# \{ 1 \leq n \leq N : f(n) - 3 f(n+r) + 3f(n+2r) - f(n+3r) = 0 \}}{N} $$ have a limit if we fix $r$? If we do not fix $r$, this difference seems to vanishes 1/3 of the time.

For different fixed $r$, the fraction ($N=100$) the count I got was: $0, 48, 27, 0, 79, 0, 70, 6, 18, 58$

Does this have an interpretation in terms of cocycles over $\mathbb{Z}$ or $\mathbb{R}$?