OFFSET
0,3
COMMENTS
Equivalently: For any three consecutive terms, there is no prime among any of the pairwise sums. Or: For any n and 0 <= i < j <= 2, a(n+i) + a(n+j) is never prime.
For any n, a term a(n) which meets the requirements always exists: For any a(n-2), a(n-1), at least one in five consecutive values of k is such that one among {a(n-2) + k, a(n-1) + k} is divisible by 2 and the other one by 3.
Conjectured to be a permutation of the nonnegative integers. The restriction to positive indices is then a permutation of the positive integers with the same property, but not the lexicographically earliest given in A329405.
See the wiki page for additional considerations and other variants. - M. F. Hasler, Nov 24 2019
LINKS
Eric Angelini, Prime sums from neighbouring terms, personal blog "Cinquante signes" (and post to the SeqFan list), Nov. 11, 2019.
Eric Angelini, Prime sums from neighbouring terms [Cached copy of html file, with permission]
Eric Angelini, Prime sums from neighbouring terms [Cached copy of pdf file, with permission]
M. F. Hasler, Prime sums from neighboring terms, OEIS wiki, Nov. 23, 2019
EXAMPLE
After the smallest possible initial terms, a(0) = 0, a(1) = 1, the next term must be neither a prime nor a prime - 1. The smallest possibility is a(2) = 8.
The next term must not be a prime - 1 nor a prime - 8, which excludes 2, 4, 6 on one hand, and 3 and 5 on the other hand. The smallest possibility is a(3) = 7.
MATHEMATICA
Nest[Block[{k = 2}, While[Nand[FreeQ[#, k], ! PrimeQ[#[[-1]] + k], ! PrimeQ[#[[-2]] + k]], k++]; Append[#, k]] &, {0, 1}, 89] (* Michael De Vlieger, Nov 15 2019 *)
PROG
(PARI) A329450(n, show=0, o=0, p=o, U=[])={for(n=o, n-1, show&&print1(p", "); U=setunion(U, [p]); while(#U>1&&U[1]==U[2]-1, U=U[^1]); for(k=U[1]+1, oo, setsearch(U, k) || isprime(o+k) || isprime(p+k) || [o=p, p=k, break])); p} \\ Optional args: show=1: print a(o..n-1); o=1: start with a(1) = 1 (A329405). See the wiki page for more general code returning a vector: S(n, 0, 3) = A329450(0..n-1).
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, based on an idea of Eric Angelini, Nov 13 2019
EXTENSIONS
Edited by N. J. A. Sloane, Nov 14 2019
New definition corrected by M. F. Hasler, Nov 15 2019
STATUS
approved