OFFSET
0,2
COMMENTS
In recent years, a number of problems have been investigated that concern representing integers as the signed sum of consecutive prime numbers. See, for example, A327467 and the Rivera link.
A000230, which concerns prime gaps, can be considered a more historic such sequence. Here we look at a minor generalization of A000230 in the spirit of signed sums.
When a(n) <> -1, a(n) together with the next prime generate a satisfactory example for proving A362465(2n) = 2.
LINKS
Carlos Rivera, Conjecture 21. Rivera's conjecture, The Prime Puzzles and Problems Connection.
FORMULA
PROG
(Python)
from sympy import sieve as prime
def A363544(n):
if n == 0: return -1
k = 2
while (prime[k] + prime[k+1]) < 2*n and (prime[k] + prime[k+1]) // 2 != n: k += 1
if (prime[k] + prime[k+1]) // 2 == n: return prime[k]
k = 2
while (prime[k+1] - prime[k]) // 2 != n: k += 1
return prime[k]
print([A363544(n) for n in range(0, 50)])
CROSSREFS
KEYWORD
sign
AUTHOR
Karl-Heinz Hofmann and Peter Munn, Jun 09 2023
STATUS
approved