login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A361806 Sum of distinct prime factors of all composite numbers between n-th and (n+1)st primes. 1
0, 2, 5, 10, 5, 17, 5, 28, 30, 10, 45, 42, 12, 44, 47, 76, 10, 72, 57, 5, 97, 51, 117, 150, 28, 22, 83, 5, 65, 321, 66, 131, 28, 298, 10, 108, 172, 145, 109, 205, 10, 276, 5, 127, 16, 441, 582, 130, 24, 80, 232, 10, 276, 195, 270, 256, 10, 218, 187, 52, 388, 701, 162 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = A008472(A061214(n)).
EXAMPLE
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.
MATHEMATICA
a[n_] := Plus @@ Union@ (Join @@ (FactorInteger[#][[;; , 1]] & /@ Range[Prime[n] + 1, Prime[n + 1] - 1])); Array[a, 65] (* Amiram Eldar, Mar 27 2023 *)
PROG
(Python)
from sympy import primefactors, sieve
def A361806(n):
primeset = []
for composites in range (sieve[n]+1, sieve[n+1]):
for p in primefactors(composites): primeset.append(p)
return(sum(set(primeset)))
(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
CROSSREFS
Sequence in context: A227317 A224300 A175467 * A188525 A324503 A126842
KEYWORD
nonn,easy
AUTHOR
Karl-Heinz Hofmann, Mar 26 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 09:28 EDT 2024. Contains 371967 sequences. (Running on oeis4.)