close
login
A390314
a(1) = 1; for n > 1, a(n) is the smallest unused number such that the sum a(1) + ... + a(n) is coprime to the product a(1) * ... * a(n).
9
1, 2, 4, 6, 10, 8, 12, 16, 14, 24, 30, 22, 18, 26, 34, 36, 20, 28, 38, 40, 32, 42, 46, 48, 44, 52, 56, 60, 54, 58, 66, 50, 64, 62, 70, 84, 90, 72, 78, 80, 96, 94, 74, 88, 68, 82, 104, 76, 92, 102, 106, 98, 100, 110, 112, 120, 132, 108, 122, 126, 154, 86, 142, 138
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
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
A390314_list = list(islice(A390314_gen(), 100)) # Chai Wah Wu, Mar 10 2026
CROSSREFS
Derived sequences: A393436-A393440.
Sequence in context: A242521 A338298 A366581 * A073659 A073661 A079052
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Feb 20 2026
STATUS
approved