Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #17 Dec 08 2020 21:15:03
%S 0,0,4,0,5,0,12,6,7,0,15,0,9,8,28,0,20,0,21,10,13,0,35,10,15,24,27,0,
%T 28,0,60,14,19,12,48,0,21,16,49,0,36,0,39,32,25,0,75,14,42,20,45,0,65,
%U 16,63,22,31,0,68,0,33,40,124,18,52,0,57,26,54,0,104,0,39,48,63,18,60,0,105,78,43
%N If n = p_1 * ... * p_m with primes p_i <= p_{i+1}, a(n) = Sum_{j=1..m-1} p_1*...*p_j + Sum_{j=2..m} p_j*...*p_m.
%C a(n) is the sum of proper prefixes and suffixes of the prime factorization of n.
%C a(n)=0 if n is prime.
%C a(n)=p+q if n=p*q is a semiprime.
%C First differs from A288654 at n=30, with a(30)=28 while A288654(30)=0.
%H Robert Israel, <a href="/A339436/b339436.txt">Table of n, a(n) for n = 2..10000</a>
%e 12=2*2*3 so a(12) = 2 + 2*2 + 2*3 + 3 = 15.
%p f:= proc(n) local L,m;
%p L:= sort(map(t -> t[1]$t[2],ifactors(n)[2]));
%p m:= nops(L);
%p add(mul(L[i],i=1..j)+mul(L[i],i=j+1..m),j=1..m-1)
%p end proc:
%p map(f, [$2..100]);
%o (PARI) conv(n) = {my(f=factor(n), v=vector(bigomega(n)), k=1); for (i=1, #f~, for (j=1, f[i,2], v[k] = f[i,1]; k++;);); v;}
%o a(n) = my(v=conv(n)); sum(j=1, #v-1, prod(k=1, j, v[k])) + sum(j=2, #v, prod(k=j, #v, v[k])); \\ _Michel Marcus_, Dec 04 2020
%Y Cf. A288654.
%K nonn
%O 2,3
%A _J. M. Bergot_ and _Robert Israel_, Dec 04 2020