%N Lexicographically earliest sequence of distinct terms such that what emerges from the mask (right-aligned) is a square (see the Comments section for the mask explanation).
%C For any pair of consecutive 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 right. What is not covered by the mask forms a square number on the left.
%C 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.
%C This sequence is a permutation of the positive integers, as all integers will appear at some point, either as mask or masked.
%H Jean-Marc Falcoz, <a href="/A303848/b303848.txt">Table of n, a(n) for n = 1..10001</a>
%e In the pair (1,10), 1 is the mask; 1 emerges and is a square;
%e in the pair (10,2), 2 is the mask; 1 emerges and is a square;
%e in the pair (2,11), 2 is the mask; 1 emerges and is a square;
%e in the pair (11,3), 3 is the mask; 1 emerges and is a square;
%e in the pair (10199,2018), 2018 is the mask; 1 emerges and is a square;
%Y Cf. A303783 (same idea, but the mask is left-aligned).
%A _Eric Angelini_ and _Jean-Marc Falcoz_, May 01 2018