OFFSET
1,1
EXAMPLE
a(2) = 12 because 5 (= A345977(2)) + 7 = 12 = 2^2*3 is the first sum S of 2 consecutive primes for which omega(S) = 2. 2 + 3 = 5, and 3 + 5 = 8 = 2^3 both have only one prime dividing S.
a(3) = 1015 = 331 + 337 + 347 = 5*7*29;
a(4) = 390 = 89 + 97 + 101 + 103 = 2*3*5*13;
a(5) = 26565 = 5297 + 5303 + 5309 + 5323 + 5333 = 3*5*7*11*23.
From Jon E. Schoenfield, Sep 23 2023: (Start)
Since a(n) is the sum of n consecutive primes, a(n) is even iff n is even (provided that 2 is not among the consecutive primes, which happens only at n=1).
It seems that a(n) is usually squarefree, but a(2) and a(14) are multiples of 4.
The prime factorizations of the first 19 terms are shown in the table below. (To highlight the tendency of the terms to include the smallest odd primes among their divisors, each prime < 80 has its own column.)
.
n prime factorization of a(n) primes < 80 | > 80
-- ---------------------------------------------------------------+-----
1 2 |
2 2^2*3 |
3 5*7 *29 |
4 2*3*5 *13 |
5 3*5*7*11 *23 |
6 2*3*5*7*11 *29 |
7 3*5*7 *13*17*19 *47 |
8 2*3*5*7*11*13*17 |*97
9 3*5*7*11*13 *19*23 *37 *61 |
10 2*3*5*7*11*13*17*19 *29 *53 |
11 3*5*7*11*13*17 *23*29*31*37 *43 |
12 2*3*5*7*11*13*17*19*23*29 *43 *73 |
13 3*5*7*11*13*17*19*23*29*31 *43 *59 *73 |
14 2^2*3*5*7*11*13*17*19*23*29*31 *41 *53 *67 |
15 3*5*7*11*13*17*19*23*29*31 *41*43 *53*59 *73 |
16 2*3*5*7*11*13*17*19*23*29*31*37 *43 *53 *67*71 |
17 3*5*7*11*13*17*19*23*29*31*37*41*43 *53*59 *73 |*107
18 2*3*5*7*11*13*17*19*23 *31*37*41*43*47*53*59*61*67 |
19 3*5*7*11*13*17*19*23*29*31*37*41*43*47 *59*61 *71 *79|*131
(End)
PROG
(Python)
from sympy import nextprime, prime, primefactors, primerange
def a(n):
plst = [p for p in primerange(1, prime(n)+1)]
while len(primefactors(sum(plst))) != n:
plst = plst[1:] + [nextprime(plst[-1])]
return sum(plst)
print([a(n) for n in range(1, 7)]) # Michael S. Branicky, Jul 16 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Jul 16 2021
EXTENSIONS
a(8)-a(10) from Michael S. Branicky, Jul 16 2021
a(11)-a(12) from Martin Ehrenstein, Jul 17 2021
a(13)-a(19) from Jon E. Schoenfield, Sep 23 2023
STATUS
approved