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.

A378819 a(n) is the number of distinct nondegenerate triangles whose sides are prime factors of n.

This page as a plain text file.
%I A378819 #6 Jan 07 2025 10:21:16
%S A378819 0,1,1,1,1,4,1,1,1,3,1,4,1,3,4,1,1,4,1,3,3,3,1,4,1,3,1,3,1,8,1,1,3,3,
%T A378819 4,4,1,3,3,3,1,7,1,3,4,3,1,4,1,3,3,3,1,4,3,3,3,3,1,8,1,3,3,1,3,7,1,3,
%U A378819 3,7,1,4,1,3,4,3,4,7,1,3,1,3,1,7,3,3,3,3
%N A378819 a(n) is the number of distinct nondegenerate triangles whose sides are prime factors of n.
%C A378819 A prime factor can be used for several sides.
%C A378819 A nondegenerate triangle is a triangle whose sides (u, v, w) are such that u + v > w, v + w > u and u + w > v.
%H A378819 Felix Huber, <a href="/A378819/b378819.txt">Table of n, a(n) for n = 1..10000</a>
%H A378819 Wikipedia, <a href="https://en.wikipedia.org/wiki/Triangle_inequality">Triangle Inequality</a>
%F A378819 a(n) = a(A007947(n)).
%F A378819 a(p^k) = 1 for prime powers p^k (p prime, k >= 1).
%e A378819 a(10) = 3 because there are the 3 distinct nondegenerate triangles (2, 2, 2), (2, 5, 5), (5, 5, 5) whose sides are prime factors of 10. Since 2 + 2 < 5, (2, 2, 5) is not a triangle.
%p A378819 A378819:=proc(n)
%p A378819    local a,i,j,k,L;
%p A378819    L:=NumberTheory:-PrimeFactors(n);
%p A378819    a:=0;
%p A378819    for i to nops(L) do
%p A378819       for j from i to nops(L) do
%p A378819          for k from j to nops(L) while L[k]<L[i]+L[j] do
%p A378819             a:=a+1;
%p A378819          od
%p A378819       od
%p A378819    od;
%p A378819    return a
%p A378819 end proc;
%p A378819 seq(A378819(n),n=1..88);
%Y A378819 Cf. A000040, A000961, A001221, A007947, A070088, A306678, A316841, A316842, A366398, A378820, A379033.
%K A378819 nonn
%O A378819 1,6
%A A378819 _Felix Huber_, Dec 27 2024