A283222 Integer area of integer-sided triangle such that the sides are of the form p, p+2, 2(p-1), where p, p+2 and (p-1)/2 are prime numbers.
66, 6810, 182430, 105470250, 17356640970, 678676246650, 1879504308930, 4491035717130, 10618004862030, 21136679055030, 23751520478010, 27081671511090, 27596192489190, 31721097756750, 115248550935750, 133303609919430, 140838829659930, 182797297112430, 197799116497230
Offset: 1
Keywords
Examples
66 is in the sequence because the area of the triangle (11, 13, 20) is given by Heron's formula with s = 22 and A = sqrt(22(22-11)(22-13)(22-20)) = 66. The numbers 11, 13 and 5 = (11-1)/2 are primes.
Programs
-
Maple
nn:=100000: for n from 1 by 2 to nn do: if isprime(n^2+2) and isprime(n^2+4) and isprime((n^2+1)/2) then printf(`%d, `,n*(2*n^2+4)): else fi: od:
-
Mathematica
nn=10000;lst={};Do[s=(2*Prime[c]-2+Prime[c+1]+Prime[c])/2;If[IntegerQ[s],area2=s (s-2*Prime[c]+2)(s-Prime[c+1])(s-Prime[c]); If[area2>0&&IntegerQ[Sqrt[area2]] &&Prime[c+1] ==Prime[c]+2 && PrimeQ[(Prime[c]-1)/2], AppendTo[lst,Sqrt[area2]]]], {c,nn}];Union[lst]
-
PARI
lista(nn) = {forprime(p=2, nn, if (isprime(p+2) && isprime((p-1)/2), ca = p; cb = p+2; cc = 2*(p-1); sp = (ca+cb+cc)/2; a2 = sp*(sp-ca)*(sp-cb)*(sp-cc); if (issquare(a2), print1(sqrtint(a2), ", "));););} \\ Michel Marcus, Mar 04 2017
Formula
a(n) == 6 mod 30.
Comments