Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #15 Apr 25 2024 15:53:12
%S 0,3,5,9,11,8,17,27,25,14,31,14,41,20,16,81,59,28,67,20,22,34,83,32,
%T 121,44,125,26,109,19,127,243,36,62,28,34,157,70,46,38,179,25,191,40,
%U 36,86,211,86,289,124,64,50,241,128,42,44,72,112,277,25,283,130,42,729,52,39,331,68,88,31
%N If n = Product (p_j^k_j) then a(n) = Sum (prime(p_j)^k_j).
%H Robert Israel, <a href="/A304251/b304251.txt">Table of n, a(n) for n = 1..10000</a>
%H Ilya Gutkovskiy, <a href="/A304251/a304251.jpg">Scatter plot of a(n) up to n=100000</a>
%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>
%F a(prime(i)^k) = prime(prime(i))^k.
%F a(A000040(k)) = A006450(k).
%F a(A006450(k)) = A038580(k).
%F a(A002110(k)) = A083186(k).
%e a(12) = 14 because 12 = 2^2*3 and prime(2)^2 + prime(3) = 3^2 + 5 = 14.
%p f:= proc(n) local t;
%p add(ithprime(t[1])^t[2],t=ifactors(n)[2])
%p end proc:
%p map(f, [$1..100]); # _Robert Israel_, Apr 25 2024
%t a[n_] := Plus @@ (Prime[#[[1]]]^#[[2]] & /@ FactorInteger[n]); a[1] = 0; Table[a[n], {n, 70}]
%o (PARI) a(n) = my(f=factor(n)); sum(k=1, #f~, prime(f[k,1])^f[k,2]); \\ _Michel Marcus_, May 09 2018
%Y Cf. A000040, A002110, A006450, A008475, A038580, A064988, A083186, A222416, A304037, A304253 (fixed points).
%K nonn
%O 1,2
%A _Ilya Gutkovskiy_, May 09 2018