login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A333779
Positive numbers m used to build entire prime set by m +/- n without duplication or 0 if there is no such m.
1
2, 4, 9, 16, 27, 42, 23, 60, 51, 70, 93, 120, 85, 114, 153, 56, 165, 174, 155, 132, 213, 218, 201, 234, 253, 288, 225, 254, 135, 360, 323, 342, 315, 274, 303, 384, 395, 420, 405, 440, 357, 420, 481, 534, 465, 454
OFFSET
0,1
COMMENTS
Conjecture: every prime is eventually constructed by the sequence.
Taking into account first 10 terms: a(0),a(1),...a(9) = [2, 4, 9, 16, 27, 42, 23, 60, 51, 70] it is possible to build the following primes: [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 43, 47, 53, 59, 61, 67, 79], the only not covered (yet) primes <= 79 are: [41, 71, 73]. 73 will be covered by a(12)=85 (73=85-12), and both 41 and 71 by a(15)=56 (41=56-15, 71=56+15).
The truth of Polignac's conjecture would imply that all terms are well defined. - Rémy Sigrist, Apr 26 2020
a(n) > 0 for 1 <= n <= 10^6. - David A. Corneth, Jun 06 2020
EXAMPLE
a(0)=2, because 2=2+0=2-0 and 2 is prime.
a(1)=4, because 3=4-1, 5=4+1, both 3 and 5 are primes, not covered yet.
a(1) is not 3 because 3+1=4 is not a prime number.
a(2)=9, because 7=9-2, 11=9+2, both 7 and 11 are primes, not covered yet.
a(2) is not 5 (although 5-2=3 and 5+2=7, both are primes) because 3 is already covered by a term a(1) - this sequence is without duplication.
MATHEMATICA
Nest[Function[{t, i}, Append[t, Block[{k = 2, s}, While[! AllTrue[Set[s, k + i {-1, 1}], And[PrimeQ@ #, FreeQ[t[[All, -1]], #] ] &], k++]; {k, s}] ]] @@ {#, Length@ #} &, {{2, {2}}}, 60][[All, 1]] (* Michael De Vlieger, May 03 2020 *)
PROG
(PARI) { p=2; pp=[]; for (n=0, 45, for (k=1, oo, while (#pp<k || pp[k]+2*n>pp[#pp], pp = concat(pp, p); p = nextprime(p+1); ); if (setsearch(pp, pp[k]+2*n), print1 (pp[k]+n", "); pp = setminus(pp, Set([pp[k], pp[k]+2*n])); break))) } \\ Rémy Sigrist, Jun 06 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Marcin Barylski, Apr 05 2020
EXTENSIONS
More terms from Michael De Vlieger, May 03 2020
STATUS
approved