Given discriminant $d$ and [*j-function*](http://mathworld.wolfram.com/j-Function.html) $j(\tau)$, I was looking at,


$$F(\tau) = \sqrt{\big(j(\tau)-1728\big)d}$$


which appears in Ramanujan-type pi formulas. Let $C\_d$ be the odd prime factors of the ***constant term*** of the minimal polynomial for $F(\sqrt{-d})$. Then for prime $d>3$,


$$\begin{aligned}
C\_{5} &= 5, 11, 19.\\
C\_{7} &= 3, 7, 19.\\
C\_{11} &=7, 11, 19, 43.\\
C\_{13} &=3, 13, 43.\\
C\_{17} &=17, 19, 43, 59, \color{red}{67}.\\
C\_{19} &=3, 19, \color{red}{67}.\\
C\_{23} &=3, 7, 11, 19, 23, 43, \color{red}{67}, 83.\\
C\_{29} &=7, 23, 29, \color{red}{67}, 107.\\
C\_{31} &=3, 11, 23, 31, 43.\\
C\_{37} &=3, 7, 11, 37, \color{red}{67}, 139.\\
C\_{41} &=23, 31, 41, 43, 83, 139, \color{blue}{163}.\\
C\_{43} &=3, 7, 19, 43, \color{blue}{163}.\\
C\_{47} &=3, 11, 19, 31, 43, 47, \color{red}{67}, 107, 139, \color{blue}{163}, 179.\\
C\_{53} &=7, 11, 43, 53, 131, \color{blue}{163}, 211.\\
C\_{59} &=3, 5, 11, 23, 31, 43, 47, 59, \color{red}{67}, 211, 227.\\
C\_{61} &=3, 19, 47, 61, \color{blue}{163}.\\
C\_{67} &=3, 7, 11, 31, 43, \color{red}{67}.\\
C\_{71} &=5, 7, 11, 23, 47, 59, \color{red}{67}, 71, \color{blue}{163}, 283.\\
\vdots\\
C\_{163} &=3, 7, 11, 19, 59, \color{red}{67}, 127, \color{blue}{163}, 211, 571, 643.\\
C\_{167} &=3, 43, \color{red}{67}, 103, 131, 139, 151, \color{blue}{163}, 167, 227, 307,\dots 659.\\
\end{aligned}$$


and so on. Notice that the *d* with $C\_d$ divisible by $163$ are the first few primes of ***Euler's prime-generating polynomial***,


$$P\_1(n) = n^2+n+41 = 41, 43, 47, 53, 61, 71, 83, 97,\dots$$


and the lesser known,


$$P\_2(n) = 4n^2+163 = 163, 167, 179, 199,\dots$$


Similarly, the *d* with $C\_d$ divisible by $67$ intersect with,


$$Q\_1(n) = n^2+n+17 = 17, 19, 23, 29, 37, 47, 59, 73, 89,\dots$$


and,


$$Q\_2(n) = 4n^2+67 = 67, 71, 83, 103,\dots$$


**Q**: ***Does anybody know the reason for this "numerology"?***



There's something strange about $\sqrt{\big(j(\tau)-1728\big)d}$
"Numerology" such as you've observed is explained in the paper



> 
> Gross, B.H., and Zagier, D.: [On singular moduli](https://doi.org/10.1515/crll.1985.355.191), *J. reine angew. Math.* **355** (1985), 191$-$220. MR772491 (86j:11041)
> 
> 
> 


which gives more generally the factorizations of the constant terms
of the minimal polynomials of $j(\tau) - j(\tau')$ where $\tau,\tau'$
are quadratic imaginaries not equivalent under ${\rm PSL}\_2({\bf Z})$.
Your $j(\tau) - 1728$ is the special case $\tau' = i$.


Before seeking patterns in the appearance of factors such as $67$ and $163$,
one might wonder why all the constant terms, which are roughly exponential
in $\sqrt d$, factor into such small prime factors in the first place.
The reason is that these are the primes $p$ for which the elliptic curve
$E: y^2 = x^3 - x$, which has $j$-invariant $1728$, is also the reduction
mod $p$ of a curve of invariant $j(\sqrt{-d}\,)$, and thus has an action of
${\bf Z}[\sqrt{-d}\,]$. Since $E$ already has an action of ${\bf Z}[i]$
[with $i$ acting by $(x,y) \mapsto (-x,iy)$], this makes $E$ supersingular.
The condition that the endomorphism ring of a supersingular curve $E \bmod p$
accommodate both ${\bf Z}[i]$ and ${\bf Z}[\sqrt{-d}\,]$ comes down to
the representability of $4d$ by the quadratic form $a^2+pb^2$.
In particular $p < 4d$, which explains why all the prime factors
are small. Your $Q\_1$ and $Q\_2$ are obtained by setting $b=1$ and $b=2$,
but eventually higher $b$ arise too, e.g. you'll find $p=67$ among
the factors of $C\_{151}$ (for which the minimal polynomial has degree $7$)
because $151 = \frac14 (1^2 + 67 \cdot 3^2)$, even though $151$ is not
represented by either $n^2+n+17$ or $n^2+67$.


