login
A339423
If n = p_1 * ... * p_m with primes p_i <= p_{i+1}, a(n) = Sum_{k<m} Product_{j <= k} p_j.
3
0, 0, 0, 2, 0, 2, 0, 6, 3, 2, 0, 6, 0, 2, 3, 14, 0, 8, 0, 6, 3, 2, 0, 14, 5, 2, 12, 6, 0, 8, 0, 30, 3, 2, 5, 18, 0, 2, 3, 14, 0, 8, 0, 6, 12, 2, 0, 30, 7, 12, 3, 6, 0, 26, 5, 14, 3, 2, 0, 18, 0, 2, 12, 62, 5, 8, 0, 6, 3, 12, 0, 38, 0, 2, 18, 6, 7, 8, 0, 30, 39, 2, 0, 18, 5, 2, 3, 14, 0, 26, 7, 6
OFFSET
1,4
COMMENTS
If n is prime, a(n)=0.
a(n) is odd if and only if n is odd and A001222(n) is even.
LINKS
EXAMPLE
90 = 2*3*3*5 so a(90) = 2 + 2*3 + 2*3*3 = 26.
MAPLE
f:= proc(n)
local F, T, P, j;
F:= sort(map(t -> t[1]$t[2], ifactors(n)[2]));
T:= 0; P:= 1;
for j from 1 to nops(F)-1 do
P:= P*F[j];
T:= T+P;
od;
T
end proc:
map(f, [$1..200]);
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(k=1, #v-1, prod(j=1, k, v[j])); } \\ Michel Marcus, Dec 04 2020
CROSSREFS
Cf. A001222.
Sequence in context: A364559 A354607 A175950 * A066285 A327873 A136665
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Dec 03 2020
STATUS
approved