%I #4 Mar 23 2015 14:09:24
%S 2,67,239,241,283,331,547,577,769,829,1033,1171,1399,1447,1493,1601,
%T 1621,1759,1933,2011,2213,2243,2377,2591,2609,2707,2713,2749,2887,
%U 3259,3511,3541,3769,3793,3823,3853,3911,4241,4271,4373,4391,4423,4651,4673
%N First prime in a consecutive sequence of 4 primes such that, when taken as ordered x,y pairs, the Cartesian distance between the two points is an integer.
%H Harvey P. Dale, <a href="/A154880/b154880.txt">Table of n, a(n) for n = 1..1000</a>
%e a(1)=2 because the distance between (2,3) and (5,7) is 5. a(2)=67 because the distance between (67,71) and (73,79) is 10.
%t cdQ[{a_,b_,c_,d_}]:=IntegerQ[Sqrt[(a-c)^2+(b-d)^2]]; Transpose[Select[ Partition[ Prime[Range[700]],4,1],cdQ]][[1]] (* _Harvey P. Dale_, Mar 23 2015 *)
%K easy,nonn
%O 1,1
%A _Gil Broussard_, Jan 16 2009
|