login
a(n) is the least sum of n consecutive primes that has exactly n distinct prime divisors.
2

%I #35 Sep 24 2023 00:05:55

%S 2,12,1015,390,26565,66990,20722065,49519470,14809429635,14908423530,

%T 8397151047285,20308367048970,18572001666283065,58399604637033660,

%U 40356959620833100245,80449728529316576430,159773203138878243869955,270976605209664381237210,813028675159280138982227805

%N a(n) is the least sum of n consecutive primes that has exactly n distinct prime divisors.

%e 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.

%e a(3) = 1015 = 331 + 337 + 347 = 5*7*29;

%e a(4) = 390 = 89 + 97 + 101 + 103 = 2*3*5*13;

%e a(5) = 26565 = 5297 + 5303 + 5309 + 5323 + 5333 = 3*5*7*11*23.

%e From _Jon E. Schoenfield_, Sep 23 2023: (Start)

%e 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).

%e It seems that a(n) is usually squarefree, but a(2) and a(14) are multiples of 4.

%e 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.)

%e .

%e n prime factorization of a(n) primes < 80 | > 80

%e -- ---------------------------------------------------------------+-----

%e 1 2 |

%e 2 2^2*3 |

%e 3 5*7 *29 |

%e 4 2*3*5 *13 |

%e 5 3*5*7*11 *23 |

%e 6 2*3*5*7*11 *29 |

%e 7 3*5*7 *13*17*19 *47 |

%e 8 2*3*5*7*11*13*17 |*97

%e 9 3*5*7*11*13 *19*23 *37 *61 |

%e 10 2*3*5*7*11*13*17*19 *29 *53 |

%e 11 3*5*7*11*13*17 *23*29*31*37 *43 |

%e 12 2*3*5*7*11*13*17*19*23*29 *43 *73 |

%e 13 3*5*7*11*13*17*19*23*29*31 *43 *59 *73 |

%e 14 2^2*3*5*7*11*13*17*19*23*29*31 *41 *53 *67 |

%e 15 3*5*7*11*13*17*19*23*29*31 *41*43 *53*59 *73 |

%e 16 2*3*5*7*11*13*17*19*23*29*31*37 *43 *53 *67*71 |

%e 17 3*5*7*11*13*17*19*23*29*31*37*41*43 *53*59 *73 |*107

%e 18 2*3*5*7*11*13*17*19*23 *31*37*41*43*47*53*59*61*67 |

%e 19 3*5*7*11*13*17*19*23*29*31*37*41*43*47 *59*61 *71 *79|*131

%e (End)

%o (Python)

%o from sympy import nextprime, prime, primefactors, primerange

%o def a(n):

%o plst = [p for p in primerange(1, prime(n)+1)]

%o while len(primefactors(sum(plst))) != n:

%o plst = plst[1:] + [nextprime(plst[-1])]

%o return sum(plst)

%o print([a(n) for n in range(1, 7)]) # _Michael S. Branicky_, Jul 16 2021

%Y A345977 provides the first prime in the sum.

%Y Cf. A001221, A346382.

%K nonn

%O 1,1

%A _Hugo Pfoertner_, Jul 16 2021

%E a(8)-a(10) from _Michael S. Branicky_, Jul 16 2021

%E a(11)-a(12) from _Martin Ehrenstein_, Jul 17 2021

%E a(13)-a(19) from _Jon E. Schoenfield_, Sep 23 2023