OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
Take six consecutive primes and group them in ordered pairs (p1,p2) (p3,p4) (p5,p6) and compute the area of the triangle they form in the Cartesian plane.
EXAMPLE
a(1)=3 because the triangle with vertices (2,3)(5,7)(11,13) has an area of 3. a(2)=6 because the triangle with vertices (3,5)(7,11)(13,17) has an area of 6. a(3)=0 because the vertices (5,7)(11,13)(17,19) are collinear and do not form a triangle.
MATHEMATICA
artr[{a_, b_, c_, d_, e_, f_}]:=Module[{x=Sqrt[(c-a)^2+(d-b)^2], y=Sqrt[(d-f)^2+(c-e)^2], z=Sqrt[(e-a)^2+(f-b)^2], s}, s=(x+y+z)/2; Sqrt[s(s-x)(s-y)(s-z)]]; artr/@Partition[Prime[Range[80]], 6, 1]//Simplify (* Harvey P. Dale, Dec 30 2020 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Gil Broussard, Jan 17 2009
STATUS
approved