cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A338090 Numbers having at least one 8 in their representation in base 9.

Original entry on oeis.org

8, 17, 26, 35, 44, 53, 62, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 89, 98, 107, 116, 125, 134, 143, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 170, 179, 188, 197, 206, 215, 224, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 251, 260, 269, 278, 287, 296, 305, 314, 315
Offset: 1

Views

Author

François Marques, Oct 09 2020

Keywords

Comments

Blocks of consecutive terms have lengths in A002452. - Devansh Singh, Oct 21 2020

Examples

			70 is not in the sequence since it is 77_9 in base 9, but 76 is in the sequence since it is 84_9 in base 9.
		

Crossrefs

Cf. A007095 (base 9).
Complement of A037477.
Cf. A043485 (numbers with exactly one 8 in base 9).
Cf. Numbers with at least one digit b-1 in base b: A074940 (b=3), A337250 (b=4), A337572 (b=5), A333656 (b=6), A337141 (b=7), A337239 (b=8), this sequence (b=9), A011539 (b=10), A095778 (b=11).
Cf. Numbers with no digit b-1 in base b: A005836 (b=3), A023717 (b=4), A020654 (b=5), A037465 (b=6), A020657 (b=7), A037474 (b=8), A037477 (b=9), A007095 (b=10), A171397 (b=11).

Programs

  • Maple
    seq(`if`(numboccur(8, convert(n, base, 9))>0, n, NULL), n=0..100);
  • Mathematica
    Select[ Range[ 0, 100 ], (Count[ IntegerDigits[ #, 9 ], 8 ]>0)& ]
  • PARI
    isok(m) = #select(x->(x==8), digits(m, 9)) >= 1;
    
  • Python
    from gmpy2 import digits
    def A338090(n):
        def f(x):
            l = (s:=digits(x,9)).find('8')
            if l >= 0: s = s[:l]+'7'*(len(s)-l)
            return n+int(s,8)
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Dec 04 2024