OFFSET
1,1
COMMENTS
A permutation of the numbers of the form 10k+z, 0 <= z <= 9, k having a digit > z or a digit 1 followed by a digit < z.
Sequence suggested by Eric Angelini, first 500 terms independently computed by Jack Brennen, cf. link to SeqFan list.
LINKS
M. F. Hasler, Table of n, a(n) for n = 1..10000
E. Angelini, A sum visible in the 1st integer, and replies to this post, SeqFan list, Feb. 4, 2016.
PROG
(PARI) EA(n, a=List(10), u=[0])={ my(isok(n)=vecmax(n=digits(n))>n[#n] || sum(i=1, #n-2, n[i]==1 && n[i+1]<n[#n])); for(n=1, n-1, u=setunion(u, [a[n]]); until( isok(u[1]+1) || !u[1]++ , while(#u>1&&u[2]==u[1]+1, u=u[^1])); ok=setintersect(apply(t->t-a[n]%10, Set(concat(ok=digits(a[n]), vector(#ok-1, i, ok[i+1]+ok[i]*10)))), [1..9]); for(k=u[1]+1, 9e9, setsearch(u, k) && next; isok(k) || next; setsearch(ok, digits(k)[1]) && listput(a, k) && break; k=digits(k); k=(k[1]+1)*10^(#k-1)-1)); Vec(a)}
CROSSREFS
KEYWORD
AUTHOR
M. F. Hasler, Feb 04 2016
STATUS
approved