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”).
%I #44 Apr 03 2021 12:48:44
%S 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,
%T 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,
%U 6,1,16,27,59,-2,61,29,1,-8,8,6,67,13,20,0,71,-6,73
%N 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.
%e a(9) = 0 since the prime factors are 3 and 3, and 3 - 3 = 0.
%e a(11) = 11 since the only prime factor of 11 is 11, and 11 - 0 = 11.
%e a(24) = -3 since the prime factors of 24 are 2, 2, 2, and 3, and 3 - (2 + 2 + 2) = -3.
%t Table[a=Flatten[Table@@@FactorInteger[k]];Last@a-Total@Most@a,{k,2,100}] (* _Giorgos Kalogeropoulos_, Mar 31 2021 *)
%o (Python)
%o from sympy import factorint
%o def a(n): f = factorint(n); return 2*max(f) - sum(p*f[p] for p in f)
%o print([a(n) for n in range(2, 74)]) # _Michael S. Branicky_, Mar 23 2021
%o (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
%Y Cf. A071321, A071322. Related to A006530.
%K sign
%O 2,1
%A _Elam Blackwell_, Mar 14 2021