login
A392530
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), where both the sum and product are nonprime.
1
1, 8, 16, 2, 22, 20, 50, 4, 10, 26, 44, 34, 64, 32, 28, 56, 112, 14, 46, 68, 122, 52, 62, 40, 74, 70, 170, 82, 58, 80, 110, 94, 172, 86, 104, 100, 280, 116, 302, 118, 148, 92, 98, 124, 140, 78, 134, 18, 88, 368, 162, 142, 176, 166, 258, 188, 24, 214, 200, 66, 156
OFFSET
1,2
COMMENTS
As the product is always even, all terms beyond a(2) must also be even to ensure that the sum of all terms is odd.
In the first 10000 terms all even numbers less than 12658 appear; it is likely the sequence contains all even numbers.
LINKS
Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^14, with a color function showing 1 in black, primes 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 powerful nor squarefree in blue.
EXAMPLE
a(5) = 22 as the sum of all terms a(1) to a(6) = 1 + 8 + 16 + 2 + 22 = 49 = 7^2 which is coprime to the product of all terms 1 * 8 * 16 * 2 * 22 = 5632 = 2^9 * 11.
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], AnyTrue[{s + k, p*k}, PrimeQ]], k += 2]; c[k] = True; Sow[k]; s += k; p *= k; If[k == u, While[c[u], u += 2] ], {n, 2, nn}] ][[-1, 1]] ] (* Michael De Vlieger, Feb 21 2026 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon, Feb 20 2026
STATUS
approved