OFFSET
1,7
COMMENTS
According to the conjecture in A237840, a(n) should be always positive.
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) = 3 since there are exactly 2^2 = 4 twin prime pairs not exceeding 3*7 = 21 (namely, {3, 5}, {5, 7}, {11, 13} and {17, 19}), but the number of twin prime pairs not exceeding 1*7 and the number of twin prime pairs not exceeding 2*7 are 2 and 3 respectively, none of which is a square.
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, " ", k]; Goto[aa]], {k, 1, n}];
Print[n, " ", 0]; Label[aa]; Continue, {n, 1, 100}]
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Zhi-Wei Sun, Feb 14 2014
STATUS
approved