login
A378819
a(n) is the number of distinct nondegenerate triangles whose sides are prime factors of n.
6
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, 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, 3, 7, 1, 4, 1, 3, 4, 3, 4, 7, 1, 3, 1, 3, 1, 7, 3, 3, 3, 3
OFFSET
1,6
COMMENTS
A prime factor can be used for several sides.
A nondegenerate triangle is a triangle whose sides (u, v, w) are such that u + v > w, v + w > u and u + w > v.
FORMULA
a(n) = a(A007947(n)).
a(p^k) = 1 for prime powers p^k (p prime, k >= 1).
EXAMPLE
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.
MAPLE
A378819:=proc(n)
local a, i, j, k, L;
L:=NumberTheory:-PrimeFactors(n);
a:=0;
for i to nops(L) do
for j from i to nops(L) do
for k from j to nops(L) while L[k]<L[i]+L[j] do
a:=a+1;
od
od
od;
return a
end proc;
seq(A378819(n), n=1..88);
KEYWORD
nonn
AUTHOR
Felix Huber, Dec 27 2024
STATUS
approved