cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A343923 If n = Product (p_j^k_j) then a(n) = Sum (abs(p_j-k_j)) (a(1) = 0 by convention).

This page as a plain text file.
%I A343923 #13 Jun 05 2021 17:22:43
%S A343923 0,1,2,0,4,3,6,1,1,5,10,2,12,7,6,2,16,2,18,4,8,11,22,3,3,13,0,6,28,7,
%T A343923 30,3,12,17,10,1,36,19,14,5,40,9,42,10,5,23,46,4,5,4,18,12,52,1,14,7,
%U A343923 20,29,58,6,60,31,7,4,16,13,66,16,24,11,70,2,72
%N A343923 If n = Product (p_j^k_j) then a(n) = Sum (abs(p_j-k_j)) (a(1) = 0 by convention).
%F A343923 Additive with a(p^e) = abs(p-e).
%e A343923 a(24) = a(2^3 * 3) = abs(2 - 3) + abs(3 - 1) = 3. a(27) = a(3^3) = 0.
%t A343923 a[n_] := Plus @@ (Abs[#[[1]] - #[[2]]] & /@ FactorInteger[n]); Array[a, 100] (* _Amiram Eldar_, May 04 2021 *)
%o A343923 (PARI) a(n)=local(t); if(n<1, 0, t=factor(n); vecsum(abs(t[,1]-t[,2])))
%Y A343923 Cf. A008474.
%K A343923 nonn
%O A343923 1,3
%A A343923 _Peter Schorn_, May 04 2021