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.

A338269 Odd primes p such that the area of the triangle with sides p and the next two primes achieves a record for closeness to an integer.

This page as a plain text file.
%I A338269 #13 Oct 24 2020 08:46:51
%S A338269 3,5,103,149,337,491,1559,1753,5009,12239,44381,219097,2789881,
%T A338269 3137357,4012297,4171337,4217693,5910397,6837499,23800489,53253617,
%U A338269 994831501,2894057281,3415613611,39349394531
%N A338269 Odd primes p such that the area of the triangle with sides p and the next two primes achieves a record for closeness to an integer.
%e A338269 a(3)=103 is in the sequence because 103 is a prime, the triangle with sides 103 and the next two primes 107 and 109 has area sqrt(382278435)/4 whose distance to the nearest integer, 4888, is approximately 0.0145, and this is less than any distance previously achieved.
%p A338269 atr:= proc(p,q,r) local s; s:= (p+q+r)/2; sqrt(s*(s-p)*(s-q)*(s-r)) end proc:
%p A338269 p:= 2: q:= 3: r:= 5: count:= 0: R:= NULL: dmin:= infinity:
%p A338269 while count < 10 do
%p A338269   p:= q; q:= r; r:= nextprime(r);
%p A338269   a:= atr(p,q,r);
%p A338269   d:= abs(a - round(a));
%p A338269   if is(d < dmin) then
%p A338269     count:= count+1;
%p A338269     dmin:= d;
%p A338269     R:= R, p;
%p A338269   fi;
%p A338269 od:
%p A338269 R;
%o A338269 (PARI) lista(nn) = {my(m=p=3, q=5, s, t); forprime(r=7, nn, s=sqrt((p-s=(p+q+r)/2)*(q-s)*(s-r)*s); if(m>t=min(s-floor(s), ceil(s)-s), print1(p, ", "); m=t); p=q; q=r); } \\ _Jinyuan Wang_, Oct 24 2020
%Y A338269 Cf. A330096, A338262, A338267.
%K A338269 nonn,more
%O A338269 1,1
%A A338269 _Robert Israel_, Oct 19 2020
%E A338269 a(13)-a(25) from _Jinyuan Wang_, Oct 24 2020