login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A338090
Numbers having at least one 8 in their representation in base 9.
15
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,1
COMMENTS
Blocks of consecutive terms have lengths in A002452. - Devansh Singh, Oct 21 2020
LINKS
EXAMPLE
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.
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)& ]
PROG
(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
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).
Sequence in context: A290227 A277052 A305496 * A043485 A031495 A224829
KEYWORD
nonn,base,easy
AUTHOR
François Marques, Oct 09 2020
STATUS
approved