# How come if $\ i\$ not of the following form, then $12i + 5$ must be prime?

I know if $\ i\$ of the following form $\ 3x^2 + (6y-3)x - y\$ or $\ 3x^2 + (6y-3)x + y - 1, \ \ x,y \in \mathbb{Z}^{+},i \in \mathbb Z_{\ge 0}$,

then $\ 12i + 5\$ must be composite number, because:

$12(3x^2 + (6y-3)x + y - 1) + 5 = 36x^2 + (72y - 36)x + (12y - 7) = (6x + 12y - 7)(6x + 1)$

How come if $\ i\$ not of the following form $\ 3x^2 + (6y-3)x - y\$ and $\ 3x^2 + (6y-3)x + y - 1\$,

then $12i + 5$ must be prime? $\ x,y \in \mathbb{Z}^{+},i \in \mathbb Z_{\ge 0}$.

For example: $\ 5 = \ 3*1^2 + (6*1-3)*1 - 1\$ ,when $\ x = y = 1\$, as proved before,$\ 5*12+5\$ must be composite number;

$\ 0, \ 1. \ 2.\ 3.\ 4\$ can't of the following form $\ 3x^2 + (6y-3)x - y\$ and $\ 3x^2 + (6y-3)x + y - 1\$,

$\ 12*0 + 5 = 5\$, $\ 5$ is prime,$\ 12*1 + 5 = 17\$, $\ 17$ is prime, and so on,

• What makes you think this is true for all such $i$? – Emil Jeřábek Apr 30 '14 at 11:30
• This has been proved,but that prove unreadable,waiting a prove of coolness. – mike Apr 30 '14 at 11:33
• Lemme reply Gerry Myerson here, that proof not in english and not in readable math language, that will mess you up. – mike Apr 30 '14 at 11:39

Suppose that $12i+5$ is composite, say $12i+5 = ab$. Then looking modulo $6$, we get that one of the elements $a,b$ is $1 \pmod{6}$ and the other is $-1 \pmod{6}$; assume w.l.o.g. that $a$ is $1 \pmod{6}$, and write $a = 6r+1$ and $b = 6s-1$.
Observe that $r$ and $s$ must have different parity. Indeed, if they are both even or both odd, then computing modulo $12$, we would get that $ab \equiv -1 \pmod{12}$, which is false.
If $s>r$, then we set $x = r$, and $s = r + (2y-1)$ for some positive number $y$. Then compute $ab$, to get $i = 3x^2 + (6y-3)x + y - 1$.
If $s<r$, then we set $x = s$, and $r = s + (2y-1)$ for some positive number $y$. Then compute $ab$, to get $i = 3x^2 + (6y-3)x - y$.