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.

A118503 Sum of digits of prime factors of n, with multiplicity.

This page as a plain text file.
%I A118503 #28 Jun 08 2024 21:00:02
%S A118503 0,2,3,4,5,5,7,6,6,7,2,7,4,9,8,8,8,8,10,9,10,4,5,9,10,6,9,11,11,10,4,
%T A118503 10,5,10,12,10,10,12,7,11,5,12,7,6,11,7,11,11,14,12,11,8,8,11,7,13,13,
%U A118503 13,14,12,7,6,13,12,9,7,13,12,8,14,8,12,10,12,13,14,9,9,16,13
%N A118503 Sum of digits of prime factors of n, with multiplicity.
%C A118503 This is to A095402 (Sum of digits of all distinct prime factors of n) as bigomega = A001222 is to omega = A001221. See also: A007953 Digital sum (i.e., sum of digits) of n.
%H A118503 Antti Karttunen, <a href="/A118503/b118503.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..5000 from G. C. Greubel)
%F A118503 a(n) = Sum_{i=1..k} (e_i)*A007953(p_i) where prime decomposition of n = (p_1)^(e_1) * (p_2)^(e_2) * ... * (p_k)^(e_k).
%e A118503 a(22) = 4 because 22 = 2 * 11 and the digital sum of 2 + the digital sum of 11 = 2 + 2 = 4.
%e A118503 a(121) = 4 because 121 = 11^2 = 11 * 11, summing the digits of the prime factors with multiplicity gives A007953(11) + A007953(11) = 2 + 2 = 4.
%e A118503 a(1000) = 21 because = 2^3 * 5^3 = 2 * 2 * 2 * 5 * 5 * 5 and 2 + 2 + 2 + 5 + 5 + 5 = 21, as opposed to A095402(1000) = 7.
%p A118503 A118503 := proc(n) local a; a := 0 ; for p in ifactors(n)[2] do a := a+ op(2, p)*A007953(op(1, p)) ; end do: a ; end proc: # _R. J. Mathar_, Sep 14 2011
%t A118503 sdpf[n_]:=Total[Flatten[IntegerDigits/@Flatten[Table[#[[1]],{#[[2]]}]&/@FactorInteger[n]]]]; Join[{0},Array[sdpf,100,2]] (* _Harvey P. Dale_, Sep 19 2013 *)
%o A118503 (PARI) A118503(n) = { my(f=factor(n)); sum(i=1, #f~, f[i, 2]*sumdigits(f[i, 1])); }; \\ _Antti Karttunen_, Jun 08 2024
%Y A118503 Cf. A001221, A001222, A007953, A095402, A102217, A289142 (positions of multiples of 3's).
%K A118503 base,easy,nonn
%O A118503 1,2
%A A118503 _Jonathan Vos Post_, May 06 2006
%E A118503 a(0) removed by _Joerg Arndt_ at the suggestion of _Antti Karttunen_, Jun 08 2024