login
A303782
Lexicographically earliest sequence of distinct terms such that what emerges from the mask is prime (see the Comment section for the mask explanation).
6
1, 12, 2, 13, 3, 15, 4, 17, 5, 22, 6, 23, 7, 25, 8, 27, 9, 32, 102, 10, 103, 11, 105, 14, 107, 16, 112, 18, 113, 19, 115, 20, 117, 21, 122, 24, 123, 26, 125, 28, 127, 29, 132, 30, 133, 31, 135, 33, 137, 34, 142, 35, 143, 36, 145, 37, 147, 38, 152, 39, 153, 40, 155, 41, 157, 42, 162, 43, 163, 44, 165, 45, 167, 46, 172, 47
OFFSET
1,2
COMMENTS
For any pair of contiguous terms, one of the terms uses fewer digits than the other. This term is called the mask. Put the mask on the other term, starting from the left. What is not covered by the mask forms a prime number.
The sequence starts with a(1) = 1 and is always extended with the smallest integer not yet present that doesn't lead to a contradiction.
This sequence is a permutation of the integers > 0, as all integers will appear at some point, either as mask or masked.
LINKS
EXAMPLE
In the pair (1,12), 1 is the mask; 2 emerges and is prime;
In the pair (12,2), 2 is the mask; 2 emerges and is prime;
In the pair (2,13), 2 is the mask; 3 emerges and is prime;
In the pair (13,3), 3 is the mask; 3 emerges and is prime;
...
In the pair (11525,2018), 2018 is the mask; 5 emerges and is prime;
etc.
CROSSREFS
Cf. A303783 (same idea with squares), A303784 (with even numbers), A303785 (with odd numbers), A303786 (rebuilds term by term the sequence itself).
Sequence in context: A287205 A183729 A238718 * A375462 A335043 A360287
KEYWORD
nonn,base
AUTHOR
STATUS
approved