OFFSET
2,1
COMMENTS
Conjecture: Each positive rational number r < 1 can be written as m/n with 1 < m < n such that pi(m)^2 + pi(n)^2 is a square. Also, any rational number r > 1 can be written as m/n with m > n > 1 such that pi(m)^2 - pi(n)^2 is a square.
For example, 23/24 = 19947716/20815008 with pi(19947716)^2 + pi(20815008)^2 = 1267497^2 + 1319004^2 = 1829295^2, and 7/3 = 26964/11556 with pi(26964)^2 - pi(11556)^2 = 2958^2 - 1392^2 = 2610^2.
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 = 2..100
Zhi-Wei Sun, Problems on combinatorial properties of primes, arXiv:1402.6641 [math.NT], 2014.
EXAMPLE
a(2) = 5 since pi(5)^2 + pi(5*2)^2 = 3^2 + 4^2 = 5^2.
a(3) = 30 since pi(30)^2 + pi(30*3)^2 = 10^2 + 24^2 = 26^2.
a(68) = 6260592 since pi(6260592)^2 + pi(6260592*68)^2 = 429505^2 + 22632876^2 = 22636951^2.
a(95) = 7955506 since pi(7955506)^2 + pi(7955506*95)^2 = 536984^2 + 38985687^2 = 38989385^2.
MATHEMATICA
SQ[n_]:=IntegerQ[Sqrt[n]]
Do[k=1; Label[aa]; k=k+1; If[SQ[PrimePi[k]^2+PrimePi[k*n]^2], Goto[bb], Goto[aa]]; Label[bb]; Print[n, " ", k]; Continue, {n, 2, 50}]
PROG
(PARI) a(n)={ k=2; while(!issquare(primepi(k)^2 + primepi(k*n)^2), k++); return(k); }
main(size)={ v=vector(size); for(i=2, size+1, v[i-1]=a(i)); return(v); } /* Anders Hellström, Jul 11 2015 */
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Jul 10 2015
STATUS
approved