27

What functions from $\Bbb N\to\Bbb N$ can be made from $+$, $-$, $\times$, $\div$, exponentiation, and $\lfloor\cdot\rfloor$? Call this class of functions $\mathcal Flex$ (for "floor and exponentiation").

The $\rm mod$ function $a\operatorname{mod}b$ can be defined by $a-b\lfloor a/b\rfloor$. In addition, $$\binom nk=\left\lfloor\frac{(u+1)^n}{u^k}\right\rfloor\operatorname{mod}u$$ for $u>2^n$, and $$n!=\left\lfloor\frac{r^n}{\binom rn}\right\rfloor$$ for $r>(2n)^{n+1}$. Thus the factorial function is in $\mathcal Flex$.

The function $\left\lfloor\lfloor\frac ab\rfloor-\frac ab\right\rfloor+1$ equals $1$ if $a$ divides $b$ and $0$ otherwise. According to Wilson's theorem, $n$ is prime iff $n$ divides $(n-1)!+1$; therefore, the function that is $1$ for primes and $0$ otherwise is in $\mathcal Flex$.

The function $\delta_{0,n}$ is in $\mathcal Flex$ since it equals $\left\lfloor\frac1{1+n}\right\rfloor$. I feel like there should be some way to use the MDRP theorem to show that all primitive recursive functions with images in $\{0,1\}$ are in $\mathcal Flex$, but I'm not quite sure how.

In fact, my big conjecture so far is that $\mathcal Flex$ actually equals the set of all primitive-recursive functions. (And I have a suspicion that exponentiation might be unnecessary after all...)

mathlander
  • 4,097
  • 3
    Most of these equations come from Martin Davis's exposition of the proof of the MDRP theorem: https://www.math.umd.edu/~laskow/Pubs/713/Diophantine.pdf – Akiva Weinberger Dec 25 '22 at 05:57
  • It is also possible to show that if $h(a,b,y):=\prod_{k=1}^y(a+bk)$ then $h\in\mathcal Flex$. (I believe this is $b^yy!\binom{q+y}y\operatorname{mod}(bq-1)$ where $q>(a+by)^y$.) In the context of proving the MDRP theorem, this is function is used in conjunction with the Sunzi (Chinese) Remainder Theorem to encode bounded quantifiers. – Akiva Weinberger Dec 25 '22 at 06:03
  • Incidentally, I don't think it really matters whether we look at $\Bbb N\to\Bbb N$ or $\Bbb Z\to\Bbb Z$. In the latter case, the function $\lfloor\frac{3n}{3n-1}\rfloor$ seems to give $1$ if $n$ is positive and $0$ otherwise, which seems useful. – Akiva Weinberger Dec 26 '22 at 20:43
  • 2
    Maybe it's this?: https://en.wikipedia.org/wiki/ELEMENTARY I have some reading to do. – Akiva Weinberger Dec 28 '22 at 04:22
  • 4
    I vote to call these "flexible functions" – mathlander Dec 29 '22 at 04:04
  • Very possibly I didn't understand this well, but isn't this question too broad? –  Jan 30 '23 at 14:15
  • 2
    @youthdoo Well, if someone provided a nice criterion for something to fall into this class, it would be a good solution. As it stands, I think this coincides with the ELEMENTARY class I found a month ago. – Akiva Weinberger Jan 30 '23 at 18:02
  • Thanks for your explanation. This got into my review queue as a test, which got me very confused. –  Jan 31 '23 at 00:55
  • Given that we have binomials and modular arithmetic, the function $\Big\lfloor 10^n\frac{16^{f(n)}}{f(n){2f(n)\choose f(n)}^2} \pmod{10}\Big\rfloor$ probably* gives the $n^\textrm{th}$ digit of $\pi$ for sufficiently fast-growing $f(n)$ like $n^{n^{n^n}}$.

    *Unless pi has an incredibly long string of zeros somewhere in its decimal expansion.

    – RavenclawPrefect Jan 23 '24 at 12:39

0 Answers0