I believe that this does what you want.
awk 'alen==length($1) {for (i=a;i<=$1;i++) print i}; {a=$1; alen=length(a); if (a==(i-1)) {a++}}'
When alen(length a) coincides with the length of the current linear cycle between aand $1, returns all missing values.
a $1, alen a, ( a i - 1), a ( 335, 339, 350 339).
@fedorqui .
: , , (, , @JohnB):
awk '{f=0; if (alen==length($1)) {for (i=a;i<=$1;i++) print i} else {f=1}} {a=$1; alen=length(a)} a==(i-1){a++} f{print; a++}'
, , .
: , , :
335
339
340
345
3412
34125
666665
666668