login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A329450 Lexicographically earliest sequence of distinct nonnegative integers such that neither a(n) + a(n+1) nor a(n) + a(n+2) is prime for any n. 25
0, 1, 8, 7, 2, 13, 12, 3, 6, 9, 15, 5, 10, 4, 11, 14, 16, 18, 17, 21, 19, 23, 25, 26, 20, 22, 24, 27, 28, 29, 34, 31, 32, 33, 30, 35, 39, 37, 38, 40, 36, 41, 44, 43, 42, 45, 46, 47, 48, 51, 54, 57, 58, 53, 52, 59, 56, 49, 50, 55, 60, 61, 62, 63, 66, 67, 68, 65, 64, 69, 71, 72, 70, 73, 74, 79, 76 (list; graph; refs; listen; history; text; internal format)
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

Table of n, a(n) for n=0..76.

Eric Angelini, Prime sums from neighbouring terms, personal blog "Cinquante signes" (and post to the SeqFan list), Nov. 11, 2019.

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

Cf. A329333 (always one odd prime among a(n+i)+a(n+j), 0 <= i < j <= 2).

Cf. A329405 (analog for positive integers).

Sequence in context: A198928 A155068 A244839 * A203069 A272531 A244684

Adjacent sequences:  A329447 A329448 A329449 * A329451 A329452 A329453

KEYWORD

nonn,changed

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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 6 19:31 EST 2019. Contains 329809 sequences. (Running on oeis4.)