%I
%S 2,4,7,14,21,28,43,52,67,86,111,150,149,180,201,232,267,312,329,366,
%T 411,446,487,532,587,654,705,742,787,852,911,972,1029,1118,1185,1242,
%U 1313,1372,1473,1528,1603,1692,1769,1852,1941,2032,2127,2212,2317,2412,2503
%N a(n) = smallest number k such that both k  n^2 and k + n^2 are primes.
%C Note that a(11) = 150 and a(12) = 149. Up to n = 10^6, this is the only case where a(n) > a(n+1). What about general case of a(n) < a(n+1)?
%C First differences are almost linear with n hence the only case with a(n) > a(n+1) is n = 11.  _Zak Seidov_, May 19 2014
%H Zak Seidov, <a href="/A216898/b216898.txt">Table of n, a(n) for n = 0..10000</a>
%F a(n) = A087711(n^2).  _T. D. Noe_, Sep 19 2012
%e a(11) = 150 because both 150  11^2 = 29 and 150 + 11^2 = 271 are primes.
%e a(12) = 149 because both 149  12^2 = 5 and 149 + 12^2 = 293 are primes.
%t Table[If[n < 1, 2, m = n^2 + 1; While[!PrimeQ[m  n^2]  !PrimeQ[m + n^2], m = m + 2]; m], {n, 0, 100}]
%Y Cf. A087711.
%K nonn
%O 0,1
%A _Zak Seidov_, Sep 19 2012
