OFFSET
1,1
COMMENTS
Conjecture: a(n) exists for any n > 0. In general, any positive rational number r can be written as m/n, where m and n are positive integers with (m-1)^2+n^2, m^2+(n-1)^2, (m+1)^2+n^2 and m^2+(n+1)^2 all prime.
It is easy to prove that if m and n are positive integers with (m-1)^2+n^2, m^2+(n-1)^2, (m+1)^2+n^2 and m^2+(n+1)^2 all prime, then either m = n = 2 or m == n == 0 (mod 5).
REFERENCES
Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28 - Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169-187.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..1000
Zhi-Wei Sun, Checking the conjecture for r = a/b with a,b = 1..60
Zhi-Wei Sun, Problems on combinatorial properties of primes, arXiv:1402.6641 [math.NT], 2014.
EXAMPLE
a(2) = 2510 since (2510-1)^2+(2510*2)^2 = 31495481, 2510^2+(2510*2-1)^2 = 31490461, (2510+1)^2+(2510*2)^2 = 31505521 and 2510^2+(2510*2+1)^2 = 31510541 are all prime.
MATHEMATICA
PQ[p_]:=PrimeQ[p]
q[m_, n_]:=PQ[(m-1)^2+n^2]&&PQ[m^2+(n-1)^2]&&PQ[(m+1)^2+n^2]&&PQ[m^2+(n+1)^2]
Do[k=0; Label[bb]; k=k+1; If[q[k, k*n], Goto[aa], Goto[bb]]; Label[aa]; Print[n, " ", k]; Continue, {n, 1, 60}]
PROG
(PARI) is_ok(k, n)=isprime((k-1)^2+(k*n)^2)&&isprime(k^2+(k*n-1)^2)&&isprime((k+1)^2+(k*n)^2)&&isprime(k^2+(k*n+1)^2)
first(m)=my(v=vector(m), k=1); for(i=1, m, while(!is_ok(k, i), k++); v[i]=k; k++; ); v; \\ Anders Hellström, Aug 17 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Aug 17 2015
STATUS
approved