## anonymous one year ago For how many positive integers $$n$$$\left \lfloor \frac{n^2}{3} \right \rfloor$is a prime number? $$\left \lfloor \right \rfloor$$ denotes the floor function.

1. ganeshie8

my initial guess is to use little fermat for $$(n,3)=1$$ we have $n^2\equiv 1\pmod{3}$

2. anonymous

what comes after that?

3. ganeshie8

$\left \lfloor \frac{n^2}{3} \right \rfloor = \left \lfloor \frac{3k+1}{3} \right \rfloor = k$ ?

4. anonymous

well, that's right, but how do we know that $$k$$ is a prime or not?

5. anonymous

Use elementary methods. Just simplify the expression.

6. ganeshie8

$n^2 = 3k+1 \implies 3k = n^2-1=(n-1)(n+1)$

7. P0sitr0n

For a general field $\mathbb{F}=\mathbb{R}$ this simplification won't work tho , since the floor function has an input interval that equals all the same value, i.e. $\lfloor5.4\rfloor=\lfloor5.2\rfloor \nrightarrow 5.4 = 5.2$, so careful

8. ganeshie8

that yields $$\large k\in \{3,5\}$$ consequently $$n\in \{4\}$$

9. ganeshie8

for $$(n,3)\ne 1$$, $$\left \lfloor \frac{n^2}{3} \right \rfloor =\left \lfloor \frac{(3k)^2}{3} \right \rfloor = 3k^2$$ is always composite except for $$k=1$$

10. ganeshie8

Overall $$n\in\{3,4\}$$

11. anonymous

how about $$n=3k+2$$

12. anonymous

and $$n=3k+1$$?

13. anonymous

sry for late response, I was out

14. ganeshie8

little fermat covers both n=3k+1, 3k+2 right

15. anonymous

right :)

16. ganeshie8

would love to see an alternate method as my method above is pretty hacky

17. ganeshie8

another way to look at it is : $$n^2$$ can never be $$3k+2$$ because $$(3k\pm 1)^2 = 3M+1$$. so $$n^2\equiv 0,1\pmod{3}$$