%I #14 Jan 03 2019 16:41:32
%S 10,26,226,626,3026,15626,42026,148226,216226,403226,416026,511226,
%T 1199026,1311026,1380626,1550026,1625626,1729226,1890626,2449226,
%U 2608226,2805626,2839226,3861226,4223026,4347226,4389026,5784026,6027026,6426226,7102226,8037226
%N Numbers n^2+1 such that (n-1)^2+1 and (n+1)^2+1 are prime.
%H Harvey P. Dale, <a href="/A217583/b217583.txt">Table of n, a(n) for n = 1..1000</a>
%p with(numtheory):for n from 1 to 500 do: x1:=n^2+1:x2:=(n+2)^2 + 1:if type(x1,prime)=true and type(x2,prime)=true then printf(`%d, `,(n+1)^2+1):else fi:od:
%t Select[Partition[Range[3000]^2+1,3,1],AllTrue[{#[[1]],#[[3]]},PrimeQ]&][[All,2]] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Jan 03 2019 *)
%o (PARI) forstep(n=3,1e3,2,if(isprime(n^2+2*n+2) && isprime(n^2-2*n+2), print1(n^2+1", "))) \\ _Charles R Greathouse IV_, Oct 09 2012
%Y Cf. A002496, A108814.
%K nonn
%O 1,1
%A _Michel Lagneau_, Oct 07 2012