OFFSET
0,1
COMMENTS
We require each of the 4 primes to appear in the sum exactly once.
Inspired by the study of problems about the signed sum of consecutive primes, for example, by Rivera in 2000 (see link).
The equivalent sequence with 2 rather than 4 primes is A363544, which is closely related to A000230, which concerns prime gaps.
Conjecture: a satisfactory prime p exists for all n.
The magnitude of the terms exhibits a notable variation that depends on the number of negations in the sum. See the visualization in the links.
All odd primes appear in the sequence. When 2n = A034963(k) we see the last occurrence of the k-th prime. Obviously, these last occurrences correspond to the sums where all the signs are positive. Do any odd primes occur only once?
LINKS
Karl-Heinz Hofmann, Table of n, a(n) for n = 0..532
Carlos Rivera, Conjecture 21. Rivera's conjecture, The Prime Puzzles and Problems Connection.
Karl-Heinz Hofmann, Solutions for n = 0 to 100.
Karl-Heinz Hofmann, Visualization of possible sums.
Karl-Heinz Hofmann, Visualization of possible sums and results.
EXAMPLE
The signed sums of 2, 3, 5 and 7 are all odd, so cannot be 2n for any n. So all terms are >= 3, the 2nd prime.
The 16 possible signed sums of 3, 5, 7 and 11 give 8 nonnegative totals: 2, 4, 6, 10, 12, 16, 20, 26. So a(1) = a(2) = a(3) = a(5) = a(6) = a(8) = a(10) = a(13) = 3.
0 was not one of the 8 totals, and 0 = 5 - 7 - 11 + 13. So a(0) = 5.
PROG
(Python)
from sympy import nextprime
import numpy as np
aupto = 100
A359199 = np.zeros(aupto+1, dtype=object)
signset = np.array([[ 1, 1, 1, 1] , # green line in visualizations (see links)
[ 1, 1, 1, -1] , # red ribbon
[ 1, 1, -1, 1] , # red ribbon
[ 1, -1, 1, 1] , # red ribbon
[ 1, 1, -1, -1] , # magenta ribbon
[ 1, -1, 1, -1] , # magenta ribbon
[ 1, -1, -1, 1] , # magenta ribbon
[ 1, -1, -1, -1]], # red ribbon
dtype="i4")
primeset = np.array([3, 5, 7, 11], dtype=object)
while all(A359199) == 0:
for signs in signset:
asum = abs(sum(signs * primeset)) // 2
primeset = np.append(primeset, nextprime(primeset[-1]))[1:]
print(list(A359199))
CROSSREFS
KEYWORD
nonn
AUTHOR
Karl-Heinz Hofmann and Peter Munn, Jun 04 2023
STATUS
approved
