login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A076643
Positive integers read backwards, but omit a number if it is <= an earlier number.
1
1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 21, 31, 41, 51, 61, 71, 81, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 201, 301, 401, 501, 601, 701, 801, 901, 911, 921, 931, 941, 951, 961, 971, 981, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1001, 2001, 3001, 4001, 5001, 6001, 7001
OFFSET
1,2
COMMENTS
a(n+1) - a(n) is a power of 10 or 2 if a(n) is of the form 10^m - 1. - David A. Corneth, Nov 26 2018
LINKS
FORMULA
a((9*m^2 + 7*m + 2) / 2) = 10^m - 1, m > 0. - David A. Corneth, Nov 25 2018
EXAMPLE
The beginning list is 1,2,3,4,5,6,7,8,9,1,11; but 1 < 9 so omit it.
MAPLE
d := N->`if`(N=0, [0], ListTools[Reverse](convert(N, base, 10))); a := N->sum(d(N)[n]*10^(n-1), n=1..nops(d(N))); dropsort := proc(S)::list; description "Forms a strictly increasing list by dropping terms."; local T, V; T := k->max(seq(S[j], j=1..k)); V := ListTools[MakeUnique]([seq(T(j), j=1..nops(S))]); return(V); end proc; dropsort([seq(a(n), n=1..2000)]);
MATHEMATICA
Union@ FoldList[Max, IntegerReverse@ Range@ 1007] (* Michael De Vlieger, Nov 25 2018 *)
PROG
(PARI) nxt(n) = {my(d = digits(n), i = 1); while(i <= #d && d[i] == 9, i++); if(i <= #d, n+10^(#d-i), n+2)}
first(n) = my(res = vector(n)); res[1] = 1; for(i = 2, n, res[i] = nxt(res[i-1])); res \\ David A. Corneth, Nov 25 2018
CROSSREFS
Cf. A004086.
Sequence in context: A096106 A321990 A076641 * A352463 A326402 A127204
KEYWORD
nonn,easy,look,base
AUTHOR
Francois Jooste (phukraut(AT)hotmail.com), Oct 23 2002
STATUS
approved