A359199 Least prime p such that 2n can be written as a signed sum of p and the next 3 primes, or -1 if no such prime exists.
5, 3, 3, 3, 7, 3, 3, 5, 3, 19, 3, 5, 79, 3, 113, 17, 467, 7, 5, 11, 19, 17, 19, 13, 7, 17, 1123, 17, 19, 23, 11, 23, 19, 31, 2153, 31, 13, 23, 29, 31, 29, 37, 43, 37, 17, 31, 19081, 37, 43, 41, 19319, 19, 37897, 53, 43, 54193, 35671, 47, 43, 53, 23, 53, 59, 47, 35603, 61
Offset: 0
Keywords
Examples
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.
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.
Programs
-
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 if asum <= aupto and A359199[asum] == 0: A359199[asum] = primeset[0] primeset = np.append(primeset, nextprime(primeset[-1]))[1:] print(list(A359199))
Comments