|
|
A339767
|
|
a(n) = 2*gpf(n) - Sum_{p | n, p prime} p*m(p), where gpf(n) = A006530(n) is the greatest prime factor of n and m(p) is the multiplicity of p in the prime factorization of n.
|
|
0
|
|
|
2, 3, 0, 5, 1, 7, -2, 0, 3, 11, -1, 13, 5, 2, -4, 17, -2, 19, 1, 4, 9, 23, -3, 0, 11, -3, 3, 29, 0, 31, -6, 8, 15, 2, -4, 37, 17, 10, -1, 41, 2, 43, 7, -1, 21, 47, -5, 0, -2, 14, 9, 53, -5, 6, 1, 16, 27, 59, -2, 61, 29, 1, -8, 8, 6, 67, 13, 20, 0, 71, -6, 73
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
2,1
|
|
LINKS
|
|
|
EXAMPLE
|
a(9) = 0 since the prime factors are 3 and 3, and 3 - 3 = 0.
a(11) = 11 since the only prime factor of 11 is 11, and 11 - 0 = 11.
a(24) = -3 since the prime factors of 24 are 2, 2, 2, and 3, and 3 - (2 + 2 + 2) = -3.
|
|
MATHEMATICA
|
Table[a=Flatten[Table@@@FactorInteger[k]]; Last@a-Total@Most@a, {k, 2, 100}] (* Giorgos Kalogeropoulos, Mar 31 2021 *)
|
|
PROG
|
(Python)
from sympy import factorint
def a(n): f = factorint(n); return 2*max(f) - sum(p*f[p] for p in f)
(PARI) a(n) = my(f=factor(n)); 2*vecmax(f[, 1]) - sum(k=1, #f~, f[k, 1]*f[k, 2]); \\ Michel Marcus, Mar 31 2021
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|