A397790
a(n) = prime^2 closest to prime(n)^3.
Official Comments
a(n) = 1 (mod 24) for any n >= 2 because the nearest prime q is always >= 5 and the square of any prime q >= 5 is of the form 24k + 1.
Empirically, the closest prime square to prime(n)^3 is always unique. It's conjectured that no tie occurs.
The distance a(n) - prime(n)^3 is asymptotically bounded by O(p^1.5 * log(p)).
A tie cannot occur: Suppose that p^2 + q^2 = 2*r^3 for p, q, r >= 5 primes, then r == 1 (mod 24), and so r can be written as a+b*i with a > b > 0. It is clear that gcd(p+q*i, p-q*i) = 1+i in the ring of Gaussian integers, so one of p+q*i and p-q*i must be associated to (a+b*i)^3*(1+i) and the other to (a-b*i)^3*(1+i). By comparing the real and imaginary parts, one of p and q is equal to |(a+b)*(a^2-4*a*b+b^2)| and the other to |(a-b)*(a^2+4*a*b+b^2)|. This implies that we have both a^2 - 4*a*b + b^2 = +-1 and a - b = 1, which is impossible. - Jianing Song, Jul 13 2026
Sequence Chart
Data
Formula
Conjecture: a(n) = A397789(n)^2. [In other words, it is conjectured that there are no consecutive primes p1 < p2 and a prime q such that (p1 + p2)^2/4 < q^3 < (p1^2 + p2^2)/2. - _Jianing Song_, Jul 14 2026]
Cross-References
See also OEIS entries: Cf A000040 A001248 A002821 A030078 A077118 A397789