cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A106171 A triangle with three consecutive primes as sides has an area that is a prime after rounding. The sequence gives the first of the three consecutive primes.

This page as a plain text file.
%I A106171 #16 Jul 13 2025 11:47:19
%S A106171 5,11,23,59,71,89,211,239,269,349,389,419,431,467,479,521,571,577,647,
%T A106171 863,983,1087,1213,1223,1733,1747,1759,1933,1949,1973,2131,2297,2411,
%U A106171 2521,2659,2879,2909,2999,3011,3191,3203,3209,3391,3467,3469,3517,3559
%N A106171 A triangle with three consecutive primes as sides has an area that is a prime after rounding. The sequence gives the first of the three consecutive primes.
%H A106171 Harvey P. Dale, <a href="/A106171/b106171.txt">Table of n, a(n) for n = 1..1000</a>
%F A106171 Simply use the formula for the area of a triangle given the three sides.
%e A106171 For sides 5,7,11 the formula gives 12.96 and with rounding this becomes 13, a prime.
%p A106171 s:=proc(n) local a,b,c,p,A: a:=ithprime(n): b:=ithprime(n+1): c:=ithprime(n+2): p:=(a+b+c)/2: A:=sqrt(p*(p-a)*(p-b)*(p-c)): if isprime(round(A))=true then a else fi end: seq(s(n),n=1..700); # _Emeric Deutsch_, May 25 2007
%p A106171 Digits := 60 : isA106171 := proc(p) local q,r,s,area ; if isprime(p) then q := nextprime(p) ; r := nextprime(q) ; s := (p+q+r)/2 ; area := round(sqrt(s*(s-p)*(s-q)*(s-r))) ; RETURN(isprime(area)) ; else false ; fi ; end: for n from 1 to 900 do p := ithprime(n) : if isA106171(p) then printf("%d,",p) ; fi ; od : # _R. J. Mathar_, Jun 08 2007
%t A106171 arQ[{a_,b_,c_}]:=With[{s=(a+b+c)/2},PrimeQ[Round[Sqrt[s(s-a)(s-b)(s-c)]]]]; Select[Partition[Prime[Range[600]],3,1],arQ][[;;,1]] (* _Harvey P. Dale_, Jul 13 2025 *)
%K A106171 nonn
%O A106171 1,1
%A A106171 _J. M. Bergot_, May 19 2007
%E A106171 More terms from _Emeric Deutsch_ and _R. J. Mathar_, May 25 2007