login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A339436
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.
3
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, 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, 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
OFFSET
2,3
COMMENTS
a(n) is the sum of proper prefixes and suffixes of the prime factorization of n.
a(n)=0 if n is prime.
a(n)=p+q if n=p*q is a semiprime.
First differs from A288654 at n=30, with a(30)=28 while A288654(30)=0.
LINKS
EXAMPLE
12=2*2*3 so a(12) = 2 + 2*2 + 2*3 + 3 = 15.
MAPLE
f:= proc(n) local L, m;
L:= sort(map(t -> t[1]$t[2], ifactors(n)[2]));
m:= nops(L);
add(mul(L[i], i=1..j)+mul(L[i], i=j+1..m), j=1..m-1)
end proc:
map(f, [$2..100]);
PROG
(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; }
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
CROSSREFS
Cf. A288654.
Sequence in context: A089389 A046779 A356174 * A255369 A292177 A051352
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Dec 04 2020
STATUS
approved