# Generating prime numbers of the form $\lfloor \sqrt{n^3} \rfloor$

How to prove the following claim ?

Let $b_n=b_{n-1}+\operatorname{lcm}(\lfloor \sqrt{n^3} \rfloor , b_{n-1})$ with $b_1=2$ and $n>1$ . Let $a_n=b_{n+1}/b_n-1$ .

1. Every term of this sequence $a_i$ is either prime or $1$ .

2. Every odd prime of the form $\lfloor \sqrt{n^3} \rfloor$ is member of this sequence .

3. Every new prime of the form $\lfloor \sqrt{n^3} \rfloor$ in sequence is a next prime from the largest prime already listed .

Maxima implementation of generator :

/* Enter number n */
load(functs);
n:200;
b1:2;max:2;k:2;i:1;
while max<=floor(sqrt(n^3)) do
(if i=1 then(print(max),i:0),b2:b1+lcm(floor(sqrt(k^3)),b1),a:b2/b1-1,k:k+1,b1:b2,if max<a then (max:a,i:1));


You can run this code here .

• Have you already proven that $a_n$ is an integer for every $n$? – Mastrem Dec 31 '16 at 21:47
• @Mastrem I haven't proved it yet . – Peđa Terzić Jan 1 '17 at 9:19
• @Mastrem This is trivial though - $b_n$ divides $\operatorname{lcm}(\lfloor \sqrt{n^3}\rfloor,b_n)$, so it divides $b_{n+1}=b_n+\operatorname{lcm}(\lfloor \sqrt{n^3}\rfloor,b_n)$. – Wojowu Jan 1 '17 at 20:55

## 1 Answer

Since $lcm(n,m)=(n\cdot m) / \gcd(n,m)$ for all $n,m\in\Bbb{N}$, we can rewrite the formulae for $b_n$ and $a_n$: $$b_n=b_{n-1}\left(1+\frac{\lfloor\sqrt{n^3}\rfloor}{\gcd(b_{n-1},\lfloor\sqrt{n^3}\rfloor)}\right)$$ $$a_n=\frac{b_{n+1}}{b_n}-1 = \frac{\lfloor\sqrt{n^3}\rfloor}{\gcd(b_{n-1},\lfloor\sqrt{n^3}\rfloor)}$$

Let $p_n$ denote the $n$'th prime that can be written as $\lfloor\sqrt{k^3}\rfloor$ for some $k\in\Bbb{N}$. In fact, let's call the smallest possible value of $k$ $q_n$. Let $f(p_n)$ be the smallest positive integer $k$ such that $p_n\mid b_k$. Since $b_{n}\mid b_{n+1}$ for all $n\in\mathbb{N}$, we have:

$$p_n \mid \frac{b_{f(p_n)}}{b_{f(p)-1}}\Longleftrightarrow p\mid 1+\frac{\lfloor\sqrt{f(p)^3}\rfloor}{\gcd(b_{f(p)-1},\lfloor\sqrt{f(p)^3}\rfloor)}\implies p\le 1+\frac{\lfloor\sqrt{f(p)^3}\rfloor}{\gcd(b_{f(p)-1},\lfloor\sqrt{f(p)^3}\rfloor)}$$

So $\lfloor\sqrt{f(p)^3}\rfloor\ge p-1$,but if $\lfloor\sqrt{f(p)^3}\rfloor=p-1$, then $\gcd(b_{f(p)-1},\lfloor\sqrt{f(p)^3}\rfloor)\ge 2$, since $b_m$ is even for all $m\in\Bbb{N}$. Hence: $$\lfloor\sqrt{f(p)^3}\rfloor\ge p\implies f(p)\ge \lceil\sqrt{p^2}\rceil$$ So $p\nmid b_{q_n-1}$, which means $\gcd(b_{q_n-1},p_n)=1$ for all $n\in\Bbb{N}$ and thus: $$a_{q_n-1}=\frac{\lfloor\sqrt{q_n^3}\rfloor}{\gcd(b_{q_n-1},\lfloor\sqrt{q_n^3}\rfloor)}=\frac{p_n}{\gcd(b_{q_n-1},p_n)}=p_n$$

This proves your second and third statement (because $a_{q_n-1}$ is also the first element in the sequence that is even divisible by $p_n$).

• I think you misread the question: it's $\sqrt{n^3}$, not $\sqrt{n}$. – Wojowu Jan 1 '17 at 20:29
• @Wojowu I've updated my proof. – Mastrem Jan 2 '17 at 13:38
• I haven't read your entire proof, but in determining $a_n$, you have the value of $\frac{b_n}{b_{n-1}} - 1$, not $\frac{b_{n + 1}}{b_n} - 1$. The correct RHS would be $\frac{\left\lfloor \sqrt{\left(n+1\right)^3} \right\rfloor}{\gcd\left(b_n, \left\lfloor \sqrt{\left(n+1\right)^3} \right\rfloor \right)}$, i.e., increment $n$ by $1$. I'm not sure how this will affect the rest of your proof, but you may wish to check on this. – John Omielan Feb 12 at 1:36