login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A274329 Erase all pairs of contiguous terms that sum up to a prime; the remaining terms rebuild the starting sequence. 11

%I #23 Dec 02 2019 04:13:12

%S 1,2,4,3,1,5,6,2,4,8,9,3,1,5,7,10,6,2,4,8,12,11,9,3,1,5,7,13,16,10,6,

%T 2,4,8,12,14,15,11,9,3,1,5,7,13,17,20,16,10,6,2,4,8,12,14,18,19,15,11,

%U 9,3,1,5,7,13,17,21,22,20,16,10,6,2,4,8,12,14,18,24,23,19,15,11,9,3,1

%N Erase all pairs of contiguous terms that sum up to a prime; the remaining terms rebuild the starting sequence.

%C This is the lexicographically earliest such sequence starting with a(1)=1 and showing no duplicate term in any pair to be erased.

%H Lars Blomberg, <a href="/A274329/b274329.txt">Table of n, a(n) for n = 1..999</a>

%e As a(1)=1, the next term will be a(2)=2. This pair sums up to a prime (1+2=3) and will thus be erased later.

%e We cannot have a(3)=3 as a(2) and a(3) also sum up to a prime (2+3=5), which is confusing [because, by construction, the same term (here "2") cannot belong to more than one pair]. Thus a(3)=4.

%e As the first pair (1,2) will be erased, we must erase this "4" too, else the future copy of this sequence will not start with "1,2,..."

%e To erase this "4" we take the smallest available integer not yet present in a pair of "erased terms" (as ruled in the "Comments" section), that will sum up to a prime with "4". This is "3" (as 4+3=7).

%e The next term will be "1", as this "1" doesn't sum up to a prime with "3" (the term placed before "1"), and "1" can start the future copy of this sequence.

%e The next term cannot be "2", because this "2" would erase "1" (2+1=3), and we don't want that. Thus a(6)=5. But if we don't erase this "5", the future copy of this sequence will start with 1,5,... which is wrong: it has to start with 1,2,... as the original one.

%e So "5" disappears with "6" (5+6=11), this "6" being the smallest available integer not yet present in a pair of "erased terms".

%e The next term can now be "2", and we see the copy of the original sequence getting slowly build (the erased terms are underlined below; the non-erased terms reproduce the original sequence):

%e 1,2,4,3,1,5,6,2,4,8,9,3,1,5,7,10,6,2,4,8,12,11,9,3,1,

%e ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^

%e 5,7,13,16,10,6,2,4,8,12,14,15,11,9,3,1,5,7,13,17,20,16...

%e ^ ^ ^ ^ ^ ^

%Y Cf. A303845 for another "erasing criterion" (primes by concatenation).

%K nonn,base

%O 1,2

%A _Eric Angelini_, Jun 21 2016

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 04:56 EDT 2024. Contains 371767 sequences. (Running on oeis4.)