%I #37 Jun 09 2020 11:02:26
%S 2,4,9,16,27,42,23,60,51,70,93,120,85,114,153,56,165,174,155,132,213,
%T 218,201,234,253,288,225,254,135,360,323,342,315,274,303,384,395,420,
%U 405,440,357,420,481,534,465,454
%N Positive numbers m used to build entire prime set by m +/- n without duplication or 0 if there is no such m.
%C Conjecture: every prime is eventually constructed by the sequence.
%C 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).
%C The truth of Polignac's conjecture would imply that all terms are well defined. - _Rémy Sigrist_, Apr 26 2020
%C a(n) > 0 for 1 <= n <= 10^6. - _David A. Corneth_, Jun 06 2020
%H Rémy Sigrist, <a href="/A333779/b333779.txt">Table of n, a(n) for n = 0..10000</a>
%H Marcin Barylski, <a href="/A333779/a333779.cpp.txt">C++ program for generating A333779</a>
%H Marcin Barylski, <a href="http://tas-moto.org/research/OnTheSymmetryOfPrimes.pdf">On the symmetry of primes</a>
%e a(0)=2, because 2=2+0=2-0 and 2 is prime.
%e a(1)=4, because 3=4-1, 5=4+1, both 3 and 5 are primes, not covered yet.
%e a(1) is not 3 because 3+1=4 is not a prime number.
%e a(2)=9, because 7=9-2, 11=9+2, both 7 and 11 are primes, not covered yet.
%e 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.
%t 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 *)
%o (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
%Y Cf. A000040, A000230, A020483.
%K nonn
%O 0,1
%A _Marcin Barylski_, Apr 05 2020
%E More terms from _Michael De Vlieger_, May 03 2020