A362465 a(n) is the least number of 2 or more consecutive signed primes whose sum equals n.
3, 2, 2, 4, 2, 2, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 5, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 3, 2, 5, 2, 3
Offset: 0
Keywords
Examples
a(1) = 2: -2 + 3 = 1. a(0) = 3: -2 - 3 + 5 = 0. a(3) = 4: 2 + 3 + 5 - 7 = 3. The example below for a(29) gives more detail of the general method employed. a(29) = 5: 3 - 5 + 7 + 11 + 13 = 29. Since any even number of consecutive odd signed primes has an even sum, we can show a(29) <> 4. A test with all triples of consecutive signed primes up to 10^9 gave no solution for 29. The estimated lower bound for the permutation p1 + p2 - p3 is p1 - (p1 + 2)^0.525 and was never surpassed. (See Wikipedia link. "A result, due to Baker, Harman and Pintz in 2001, shows that Theta may be taken to be 0.525".) So the terms are calculated with the assumption that this is true.
Links
- Karl-Heinz Hofmann, Table of n, a(n) for n = 0..40000
- Karl-Heinz Hofmann, Examples for n = 0 to 253
- Karl-Heinz Hofmann, Possible solutions for a(n) = 3
- Karl-Heinz Hofmann, Possible solutions for a(n) = 5
- Thomas R. Nicely, First occurrence prime gaps
- Carlos Rivera, Conjecture 21. Rivera's conjecture, The Prime Puzzles and Problems Connection.
- Wikipedia, Prime Gap.
- Yitang Zhang, Bounded gaps between primes, Annals of Mathematics, Volume 179 (2014), Issue 3, pp. 1121-1174.
Crossrefs
Programs
-
Python
from sympy import primepi, sieve as prime import numpy upto = 50000 # 5000000 good for 8 GB RAM (3 Minutes) primepi_of_upto, np, arr = primepi(upto), 1, [] A362465 = numpy.zeros(upto + 1, dtype="i4") A362465[2:][::2] = 2 # holds if "upto" < 7 * 10^7 for n in range(1,primepi_of_upto + 1): arr.append([prime[n]]) while all(A362465) == 0: np += 1 for k in range(0,primepi_of_upto): temp = [] for i in arr[k]: temp.append(i + prime[k+np]) temp.append(abs(i - prime[k+np])) arr[k] = set(temp) for n in temp: if n <= upto and A362465[n] == 0: A362465[n] = np print(list(A362465[0:100]))
Formula
a(n) = a(-n).
Extensions
Edited by Peter Munn, Aug 08 2023
Comments