%I #4 Aug 24 2012 10:50:02
%S 1,2,3,4,5,6,7,12,34,56,71,23,45,67,123,456,712,345,671,234,567,1234,
%T 5671,2345,6712,3456,7123,4567,12345,67123,45671,23456,71234,56712,
%U 34567,123456,712345,671234,567123,456712,345671,234567,1234567
%N a(n) is the smallest number not yet in the sequence such that the concatenation of all terms yields a periodic stream of digits 1, 2, 3, ..., 7 (repeat from 1).
%e For a(8), having already 1, 2, 3, 4, 5, 6, 7, the next number must be 12 because after 1,2,3,4,5,6,7 we shall continue with a 1.
%e But 1 is already in the sequence so we need to add a 2 -> 12. And so on.
%Y Cf. A165300-A165304, A165306, A165307
%K easy,base,nonn
%O 1,2
%A _Paolo P. Lava_ and _Giorgio Balzarotti_, Sep 14 2009
%E Keyword base added by _R. J. Mathar_, Feb 02 2010