OFFSET
1,2
COMMENTS
The sequence is fractal-like as it embeds an infinite number of copies of itself.
The sequence was built according to these rules (see, in the Example section, the parenthesization technique):
1) no overlapping pairs of parentheses;
2) always start the content inside a pair of parentheses either with the smallest prime P > 2 not yet present inside another pair of parentheses or with the smallest composite C > 1 not yet present inside another pair of parentheses ;
3) always end the content inside a pair of parentheses either with the smallest composite C > 1 not yet present inside another pair of parentheses or with the smallest prime > 2 not yet present inside another pair of parentheses;
4) after a(1) = 1 and a(2) = 2, always try to extend the sequence with a duplicate > 1 of the oldest term of the sequence not yet duplicated; if this leads to a contradiction, open a new pair of parentheses.
LINKS
Eric Angelini, Table of n, a(n) for n = 1..20706
EXAMPLE
Parentheses are added around each pair of terms made of a composite and a prime number (in any order):
(1,2),(3,4),1,(6,5),2,3,(7,8),4,1,6,(9,11),5,2,3,7,(13,10),8,4,1,6,9,(12,17),11,...
Erasing all the parenthesized contents yields
(...),(...),1,(...),2,3,(...),4,1,6,(....),5,2,3,7,(.....),8,4,1,6,9,(.....),11,...
We see that the remaining terms rebuild the starting sequence.
CROSSREFS
For other "erasing criteria", see A303845 (prime by concatenation), A274329 (pair summing up to a prime), A303936 (pair not summing up to a prime), A303948 (pair sharing a digit), A302389 (pair having no digit in common), A303950 (pair summing up to a Fibonacci), A303951 (pair not summing up to a Fibonacci), A303953 (pair summing up to a square), A303954 (pair not summing up to a square).
KEYWORD
nonn,base
AUTHOR
Eric Angelini and Jean-Marc Falcoz, Jun 28 2018
STATUS
approved