A232530 Least square m^2 such that for all primes p where p and p-n are quadratic residues (mod 4*n), (m^2)*p can be written as x^2+n*y^2.
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 9, 1, 1, 9, 1, 4, 4, 1, 1, 9, 1, 1, 9, 4, 1, 9, 1, 16, 4, 1, 25, 4, 4, 1, 9, 16, 1, 81, 1, 4, 9, 1, 25, 64, 1, 25, 9, 4, 4, 9, 9, 16, 9, 1, 1, 36, 1, 25, 81, 9, 4, 9, 25, 4, 36, 25, 1, 144, 1, 49, 81, 4, 16, 9, 1, 64, 9, 9, 49, 36, 4, 1, 81, 16, 1, 225, 9, 4, 9, 1, 625, 64, 4, 49
Offset: 1
Examples
For n = 11, all primes p such that p such that p is a quadratic residue (mod 4*n) and p-n is a quadratic residue (mod 4*n) are either of the form x^2+11*y^2 or 3*x^2+2*x*y+4*y^2. 4*(x^2+11*y^2) = (2*x)^2+11*(2*y)^2, 4*(3*x^2+2*x*y+4*y^2) = (x+4*y)^2+11*x^2. Also, 4 is the smallest square to satisfy this condition. So, a(11) = 4. For n = 14, all primes p such that p such that p is a quadratic residue (mod 4*n) and p-n is a quadratic residue (mod 4*n) are either of the form x^2+14*y^2 or 2*x^2+7*y^2. 9*(x^2+14*y^2) = (3*x)^2+14*(3*y)^2, 9*(2*x^2+7*y^2) = (2*x+7*y)^2+14*(x-y)^2 = (2*x-7*y)^2+14*(x+y)^2. Also, 9 is the smallest square to satisfy this condition. So, a(14) = 9. For n = 17, all primes p such that p such that p is a quadratic residue (mod 4*n) and p-n is a quadratic residue (mod 4*n) are either of the form x^2+17*y^2 or 2*x^2+2*x*y+9*y^2. 9*(x^2+17*y^2) = (3*x)^2+17*(3*y)^2, 9*(2*x^2+2*x*y+9*y^2) = (x+9*y)^2+17*x^2. Also, 9 is the smallest square to satisfy this condition. So, a(17) = 9. For n = 19, all primes p such that p such that p is a quadratic residue (mod 4*n) and p-n is a quadratic residue (mod 4*n) are either of the form x^2+19*y^2 or 4*x^2+2*x*y+5*y^2. 4*(x^2+19*y^2) = (2*x)^2+19*(2*y)^2, 4*(4*x^2+2*x*y+5*y^2) = (4*x+y)^2+19*y^2. Also, 4 is the smallest square to satisfy this condition. So, a(19) = 4. For n = 20, all primes p such that p such that p is a quadratic residue (mod 4*n) and p-n is a quadratic residue (mod 4*n) are either of the form x^2+20*y^2 or 4*x^2+5*y^2. 4*(x^2+20*y^2) = (2*x)^2+20*(2*y)^2, 4*(4*x^2+5*y^2) = (4*x)^2+20*y^2. Also, 4 is the smallest square to satisfy this condition. So, a(20) = 4.
Formula
a(n)=A232529(n)^2.
Comments