OFFSET
1,2
COMMENTS
As the product is always even, all terms beyond a(1) must also be even to ensure that the sum of all terms is odd.
In the first 10000 terms, there are only seven occasions when the sum of the terms is not a prime: these are a(39) = 78, a(48) = 79, a(59) = 122, a(70) = 146, a(204) = 424, a(416) = 830, and a(969) = 1974, where the sum of the terms is 1517, 2279, 3481, 4897, 41567, 172831, and 938177, respectively. It is not known if further nonprime sums appear.
The sequence shares the first 38 terms with A073659. See the examples.
LINKS
Scott R. Shannon, Table of n, a(n) for n = 1..10000
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^14, showing 1 in black, 2 in red, proper prime powers in gold, squarefree composites in green, powerful numbers that are not prime powers in purple, and numbers that are neither squarefree nor powerful in blue.
EXAMPLE
a(5) = 10 as the sum of all terms a(1) to a(5) = 1 + 2 + 4 + 6 + 10 = 19 which is coprime to the product of all terms 1 * 2 * 4 * 6 * 10 = 360.
a(39) = 78 as the sum of all terms a(1) to a(39) = 1 + 2 + ... + 72 + 78 = 1517 = 37 * 41 which is coprime to the product of all terms 1 * 2 * ... * 72 * 78 = 22167...0000 which contains all primes 2 to 31 as distinct prime factors. This is the first term where the sum of all terms is not prime, and the first term to differ from A073659.
MATHEMATICA
Block[{c, k, s, p, u, nn}, nn = 120; c[_] := False; k = s = p = 1; c[1] = True; u = 2; {k}~Join~Reap[Do[k = u; While[Or[c[k], ! CoprimeQ[s + k, p*k]], k++]; c[k] = True; Sow[k]; s += k; p *= k; If[k == u, While[c[u], u++]], {n, 2, nn}] ][[-1, 1]] ] (* Michael De Vlieger, Feb 20 2026 *)
PROG
(Python)
from itertools import count, islice
from math import gcd
from sympy import primefactors
def A390314_gen(): # generator of terms
c, aset, a, b, s = set(), {1}, 1, 2, 1
yield 1
while True:
for n in count(b, 2):
if n not in aset:
m = s+n
if gcd(m, n)==1 and all(m%p for p in c):
a = n
yield a
aset.add(a)
s += a
c |= set(primefactors(a))
while b in aset:
b += 2
break
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Feb 20 2026
STATUS
approved
