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.

A105221 a(n) is the sum of n's distinct prime factors below n.

This page as a plain text file.
%I A105221 #24 Sep 19 2023 08:21:06
%S A105221 0,0,0,2,0,5,0,2,3,7,0,5,0,9,8,2,0,5,0,7,10,13,0,5,5,15,3,9,0,10,0,2,
%T A105221 14,19,12,5,0,21,16,7,0,12,0,13,8,25,0,5,7,7,20,15,0,5,16,9,22,31,0,
%U A105221 10,0,33,10,2,18,16,0,19,26,14,0,5,0,39,8,21,18,18,0,7,3,43,0,12,22,45
%N A105221 a(n) is the sum of n's distinct prime factors below n.
%H A105221 T. D. Noe, <a href="/A105221/b105221.txt">Table of n, a(n) for n=1..1000</a>
%F A105221 a(n) = A008472(n) - A010051(n) * n. - _Reinhard Zumkeller_, Apr 05 2013
%F A105221 G.f.: Sum_{k>=1} prime(k) * x^(2*prime(k)) / (1 - x^prime(k)). - _Ilya Gutkovskiy_, Apr 13 2021
%e A105221 a(12)=5 because 12's distinct prime factors 2 and 3 sum to 5.
%p A105221 f:= n -> convert(numtheory:-factorset(n) minus {n}, `+`):
%p A105221 map(f, [$1..100]); # _Robert Israel_, Sep 18 2023
%t A105221 Table[Total@Select[Join@@Union@*Table@@@FactorInteger@k,#<k&],{k,86}] (* _Giorgos Kalogeropoulos_, Nov 21 2021 *)
%o A105221 (Haskell)
%o A105221 a105221 n = a008472 n - n * fromIntegral (a010051 n)
%o A105221 -- _Reinhard Zumkeller_, Apr 05 2013
%o A105221 (PARI) a(n) = my(f=factor(n)); sum(k=1, #f~, if (f[k,1]<n, f[k,1])); \\ _Michel Marcus_, Nov 21 2021
%o A105221 (Python)
%o A105221 from sympy import primefactors
%o A105221 def A105221(n): return sum(p for p in primefactors(n) if p < n) # _Chai Wah Wu_, Sep 18 2023
%Y A105221 Cf. A003508, A008472, A010051.
%K A105221 easy,nonn
%O A105221 1,4
%A A105221 _Alexandre Wajnberg_, Apr 13 2005
%E A105221 Edited by _Don Reble_, Nov 17 2005