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.

A070105 Number of integer triangles with perimeter n and prime side lengths which are obtuse and scalene.

This page as a plain text file.
%I A070105 #10 Jul 27 2024 04:02:40
%S A070105 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,0,0,
%T A070105 2,0,1,0,2,0,1,0,2,0,0,0,3,0,1,0,1,0,2,0,0,0,0,0,3,0,1,0,3,0,4,0,3,0,
%U A070105 1,0,1,0,1,0,1,0,2,0,3,0,1,0,5,0,4,0,5,0,5,0
%N A070105 Number of integer triangles with perimeter n and prime side lengths which are obtuse and scalene.
%C A070105 a(n) = 0 if n is even. - _Robert Israel_, Jul 26 2024
%H A070105 Robert Israel, <a href="/A070105/b070105.txt">Table of n, a(n) for n = 1..10000</a>
%H A070105 R. Zumkeller, <a href="/A070080/a070080.txt">Integer-sided triangles</a>
%p A070105 f:= proc(n) local a,b,q,bmin,bmax,t;
%p A070105   t:= 0;
%p A070105   if n::even then return 0 fi;
%p A070105   for a from 1 to n/3 by 2 do
%p A070105     if not isprime(a) then next fi;
%p A070105     bmin:= max(a+1,(n+1)/2-a); if bmin::even then bmin:= bmin+1 fi;
%p A070105     q:= (n^2-2*n*a)/(2*(n-a));
%p A070105     if q::integer then bmax:= min((n-a)/2, q-1) else bmax:= min((n-a)/2, floor(q)) fi;
%p A070105     t:= t + nops(select(b -> isprime(b) and isprime(n-a-b), [seq(b,b=bmin .. bmax,2)]))
%p A070105   od;
%p A070105   t
%p A070105 end proc:
%p A070105 map(f, [$1..100]); # _Robert Israel_, Jul 26 2024
%Y A070105 Cf. A070080, A070081, A070082, A070101, A005044, A070088, A070090, A070103, A024156, A070132.
%K A070105 nonn,look
%O A070105 1,35
%A A070105 _Reinhard Zumkeller_, May 05 2002