On the infinity of $\{p\in \mathbb {N}:\exists n\in\mathbb{N}~p| \left \lfloor{r^n}\right \rfloor\}$

For which $r\in\mathbb{R}$ is the set $\mathscr{P}_r=\{p \in \mathbb{P}:\ (\exists n\in\mathbb{N})(p\mid\lfloor{r^n}\rfloor)\}$ infinite? Of course, if $r\in \mathbb{Z}$ then $\mathscr{P}_r $ is finite.

We can prove, for example, that for all non-constant $f\in\mathbb{Z}[x]$ the set $\{p \text{ prime}:\ (\exists n\in\mathbb{N})(p\mid f(n))\}$ is infinite (refer to this question). Actually this works somewhat more generally.

Proposition. Let $f:\mathbb{N}\rightarrow\mathbb{N}$ s.t. $(\forall k\in \mathbb{N})(\exists n\in\mathbb{N})(n>\log_2 (\max_{x\leq n}f(x))^k)$ and $f$ is uniformly quasi-injective, that is $(\exists M)(\forall n\in\Bbb{N})(|f^{-1}(n)|\leq M)$.

Then $\mathscr{P}=\{p \text{ prime}:\ (\exists n\in\mathbb{N})(p\mid f(n))\}$ is infinite.

Proof. Let $f$ be such a function, and let's assume, for simplicity, that $f$ is injective. Let's suppose by contradiction that $\mathscr{P}=\{p_1,...,p_k\}$. Let $F_n=\{f(x):\ x\leq n\}$.

Let's define $\phi :F_n\rightarrow S$ where S is the set of strings of natural numbers of length k such that every entry is less or equal to $\log_2 (\max_{x\leq n}f(x))$, and $x=p_1^{\phi(x)_1}...p_k^{\phi(x)_k}$. By the fundamental theorem of arithmetic, and the fact that $2$ is the smallest positive prime, we conclude that $\phi$ is injective and well-defined. So $\phi \circ f$ is also injective. Thus, $n\leq|S|\leq \log_2 (\max_{x\leq n}f(x))^k$, a contradiction.

However, we are not in the hypothesis of the above proposition. The natural conjecture would be that

Conjecture. $\mathscr{P}_r$ is infinite $\iff r\in \mathbb{R}\setminus \mathbb{Z}$

There is some empirical evidence that supports this conjecture. Indeed, by implementing the following code on Octave we can check what the elements of $\mathscr{P}_{r,m}=\{p\in\mathbb{P}:\ (\exists n\in\mathbb{N})(n\leq m)(p\mid\lfloor{r^n} \rfloor)\}$ are.

function p=weirdcount(r,m)
p=[];
v=[];
for k=1:m
  p=union(p,factor(floor((r)^k)));
  v(k)=length(p);
  endfor
plot(v,'*');
  end

The function also plots $|\mathscr{P}_{r,k}|$ against $k$. The following are four examples of graphs with $r=1.5,e,\pi, \sqrt{2}$ and $m=30,30,30,60$ r=1.5,m=30 r=e, m=30 r=pi, m=30 r=sqrt(2) m=60

These graphs seem to suggest that

Conjecture. $r\in \mathbb{R}\setminus \mathbb{Z} \iff |\mathscr{P}_{r,k}|=\mathcal{O}(k)$

A preliminary result toward the proof of these conjectures may be that

Proposition. Let $r\in \mathbb{R}^{+}$ and $n\in\mathbb{N}, n\geq 2$, such that $\lfloor {r^a} \rfloor$ is a power of $n$ for all $a\in \mathbb{N}$.

Then $r$ is a power of $n$.

Proof. Lengthy but easy.

Moreover, we can prove that

Proposition. $2\in \mathscr{P}_r$ almost always for $|r|>1$

Proof. Let $\mathscr{R}_p=\{r\in \mathbb{R}:p\in \mathscr{P}_r\}$. We have to prove that $\forall 1<a<b~~b-a=|\mathscr{R}_2\cap (a,b)|$. If we prove that, given an interval $(a,b)$ like above $\forall \epsilon >0$, there is always a plurinterval (a finite union of intervals) $I\subset \mathscr{R}_2\cap (a,b)$ such that $|I|\geq \frac{b-a}{2}-\epsilon$ we are finished. That, however, is implied by $\lim_{n\to\infty}\int_{a}^{b}(-1)^{\lfloor x^n\rfloor}dx=0$. We observe that (with a slight abuse of notation) $$\int_{a}^{b}(-1)^{\lfloor x^n\rfloor}dx \sim \sum_{k=a^n}^{b^n}(-1)^n((k+1)^{\frac{1}{n}}-k^{\frac{1}{n}})$$ $$\sim \sum_{k=\frac{a^n}{2}}^{\frac{b^n}{2}}2(2k+1)^{\frac{1}{n}}-(2k)^{\frac{1}{n}}-(2k+2)^{\frac{1}{n}}$$

By applying Lagrange's Theorem twice, we obtain $$0<2(2k+1)^{\frac{1}{n}}-(2k)^{\frac{1}{n}}-(2k+2)^{\frac{1}{n}}<2(\frac{1}{n}-\frac{1}{n^2})(2k+2)^{\frac{1}{n}-2}$$ So the last summation is asymptotically limited from above by $$h(n)\int_{\frac{a^n}{2}+1}^{\frac{b^n}{2}+1}x^{\frac{1}{n}-2}dx$$ (where $h(n)$ is a function s.t. $\lim_{n\to\infty}h(n)=0$) which equals. setting $m=\frac{1}{n}-1$ $$h(\frac{1}{m+1})\frac{(\frac{b^{\frac{1}{m+1}}}{2}+1)^m-(\frac{a^{\frac{1}{m+1}}}{2}+1)^m}{m}$$ which, as $n$ goes to $\infty$ (and so $m$ goes to $-1$), has limit equal to $0$. So, we are done.

This method can be easily adapted to get this more general, but still quite weak result.

Proposition. $ \forall p\in \mathbb{P} \liminf_{x\to\infty}\frac{|\mathscr{R}_p\cap(1,x)|}{x-1}\geq \frac{1}{p-1}$

Also, the above proof shows that $\forall p\in \mathbb{P}~\mathscr{R}_p$ is dense in $(-\infty,1] \cup [1,\infty)$.

Of course, if we were able to prove that $\forall p\in\mathbb{P}~p\in \mathscr{P}_r$ almost always for $|r|>1$, this would imply a nice corollary, ie, that $\mathscr{P}_r$ is almost always infinite, for |r|>1.


Solution 1:

It's definitely infinite for Mills' constant (also here and here).