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.

A361806 Sum of distinct prime factors of all composite numbers between n-th and (n+1)st primes.

This page as a plain text file.
%I A361806 #34 Apr 16 2023 15:55:20
%S A361806 0,2,5,10,5,17,5,28,30,10,45,42,12,44,47,76,10,72,57,5,97,51,117,150,
%T A361806 28,22,83,5,65,321,66,131,28,298,10,108,172,145,109,205,10,276,5,127,
%U A361806 16,441,582,130,24,80,232,10,276,195,270,256,10,218,187,52,388,701,162
%N A361806 Sum of distinct prime factors of all composite numbers between n-th and (n+1)st primes.
%H A361806 Winston de Greef, <a href="/A361806/b361806.txt">Table of n, a(n) for n = 1..10000</a>
%F A361806 a(n) = A008472(A061214(n)).
%e A361806 a(6): 6th prime = 13 and the (6+1)th prime = 17; the composites between are {14,15,16} and the distinct prime factors of this set are {2,7,3,5} (no duplicates allowed); so a(6) = 2 + 7 + 3 + 5 = 17.
%t A361806 a[n_] := Plus @@ Union@ (Join @@ (FactorInteger[#][[;; , 1]] & /@ Range[Prime[n] + 1, Prime[n + 1] - 1])); Array[a, 65] (* _Amiram Eldar_, Mar 27 2023 *)
%o A361806 (Python)
%o A361806 from sympy import primefactors, sieve
%o A361806 def A361806(n):
%o A361806     primeset = []
%o A361806     for composites in range (sieve[n]+1, sieve[n+1]):
%o A361806         for p in primefactors(composites): primeset.append(p)
%o A361806     return(sum(set(primeset)))
%o A361806 (PARI) a(n) = my(list=List()); for(i=prime(n)+1, prime(n+1)-1, my(f=factor(i)[,1]); for (k=1, #f, listput(list, f[k]))); vecsum(Set(list)); \\ _Michel Marcus_, Mar 27 2023
%Y A361806 Cf. A052297, A077218, A008472, A061214.
%K A361806 nonn,easy
%O A361806 1,2
%A A361806 _Karl-Heinz Hofmann_, Mar 26 2023