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”).

A306111
Numbers with digits in {0,...,8} such that every other digit is strictly less than its neighbors.
11
0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 20, 21, 30, 31, 32, 40, 41, 42, 43, 50, 51, 52, 53, 54, 60, 61, 62, 63, 64, 65, 70, 71, 72, 73, 74, 75, 76, 80, 81, 82, 83, 84, 85, 86, 87, 101, 102, 103, 104, 105, 106, 107, 108, 201, 202, 203, 204, 205, 206, 207, 208, 212, 213, 214, 215, 216, 217, 218, 301, 302, 303, 304, 305, 306, 307
OFFSET
1,3
COMMENTS
Terms of A032864 written in base 9.
FORMULA
a(n) = A007095(A032864(n)).
Numbers in A297147 having no digit 9: Intersection of A297147 with A007095.
EXAMPLE
There are 1+2+3+4+5+6+7+8 = 9*4 = 36 terms with 2 digits.
We obtain the 3-digit terms by appending to each of these the 1-digit terms starting with a digit larger than the last digit of the prefix: 10.{1..8}, 20.{1..8}, 21.{2..8}, 30.{1..8}, ..., 86.{7..8}, 87.{8}.
We obtain the 4-digit terms by appending to each of the 2 digit terms, the 2-digit terms starting with a digit larger than the last digit of the prefix: 10.{10,...,87}, 20.{10,...,87}, 21.{20,...,87}, 30.{10,...,87}, ..., 86.{70,...,87}, 87.{80..87}.
That way we obtain all terms with n digits by taking the 2-digit terms and appending to each of these the suitable subsequence of n-2 digit terms.
PROG
(PARI) A(Nmax=100, K=8, A=[0..K], i=vector(2*K, i, max(1, i-K+1)), c(T, v)=apply(t->t+T, v))={for(n=0, oo, for(k=10, K*11-1, if(k%10<k\10, k%10|| i=concat(i, 1+#A); A=concat(A, c(k*10^n, A[i[K*n+k%10+1]..i[K*n+K+1]-1])); #A<Nmax||return(A))))}
CROSSREFS
Cf. A306105 .. A306110 and A297147: analog for bases 3..8 and 10.
Cf. A032864 and A032858 .. A032865 for other bases 3..10.
Sequence in context: A271952 A033073 A369406 * A039172 A044958 A297145
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Oct 05 2018
STATUS
approved