OFFSET
1,2
COMMENTS
A "mixed pair" is a pair of successive integers where one is prime and the other is nonprime.
By definition, the sequence has the repeated pattern nppn (nonprime-prime-prime-nonprime) and starts with a(1) = 1. It is always extended with the smallest integer not used before and not leading to a contradiction.
This sequence is not a permutation of the natural numbers. After 20000 terms, a lot of nonprimes still have not appeeared (and probably never will). The sequence of apparently missing terms is 6, 8, 20, 22, 25, 27, 30, 34, 38, 39, 42, 44, 46, 48, 49, 51, 54, 55, ... (computed independently by Jean-Marc Falcoz and Lars Blomberg).
To elaborate reasons for the above conjecture about nonappearance, in the current b-file (8002 terms), only two terms, a(7) = 3 and a(11) = 5, have a value less than half their index. The plot2 link shows an apparently growing propensity for numbers not to appear later than the matching index. - Peter Munn, Aug 12 2023
LINKS
Jean-Marc Falcoz, Table of n, a(n) for n = 1..8002
Peter Munn, Plot2 of n/a(n), showing the "lateness" of numbers that appear in the sequence.
EXAMPLE
The "mixed pairs" in the sequence are between parentheses:
(1,2),(7,9),(4,11),(3,12),(15,19),(5,16),...
Replacing the content of the parentheses with the absolute difference of its terms gives (1),(2),(7),(9),(4),(11),(3),(12),(15),(19),(5),(16),...
which is indeed the starting sequence.
CROSSREFS
KEYWORD
nonn
AUTHOR
Eric Angelini and Jean-Marc Falcoz, Aug 22 2016
STATUS
approved