OFFSET
1,7
COMMENTS
The conjecture in A237840 implies that a(n) exists for any n > 0.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Z.-W. Sun, Problems on combinatorial properties of primes, arXiv:1402.6641, 2014
EXAMPLE
a(7) = 2 since there are exactly 2^2 twin prime pairs not exceeding 3*7 = 21 (namely, {3, 5}, {5, 7}, {11, 13} and{17,19}), and the number of twin prime pairs not exceeding 1*7 or 2*7 is not a square.
a(18055) = 675 since there are exactly 675^2 = 455625 twin prime pairs not exceeding 5758*18055.
MATHEMATICA
tw[0]:=0
tw[n_]:=tw[n-1]+If[PrimeQ[Prime[n]+2], 1, 0]
SQ[n_]:=IntegerQ[Sqrt[tw[PrimePi[n]]]]
Do[Do[If[SQ[k*n-2], Print[n, " ", Sqrt[tw[PrimePi[k*n-2]]]]; Goto[aa]], {k, 1, n}]; Print[n, " ", 0]; Label[aa]; Continue, {n, 1, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 16 2014
STATUS
approved