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.

This page as a plain text file.
%I A338090 #58 Dec 06 2024 01:36:35
%S A338090 8,17,26,35,44,53,62,71,72,73,74,75,76,77,78,79,80,89,98,107,116,125,
%T A338090 134,143,152,153,154,155,156,157,158,159,160,161,170,179,188,197,206,
%U A338090 215,224,233,234,235,236,237,238,239,240,241,242,251,260,269,278,287,296,305,314,315
%N A338090 Numbers having at least one 8 in their representation in base 9.
%C A338090 Blocks of consecutive terms have lengths in A002452. - _Devansh Singh_, Oct 21 2020
%H A338090 François Marques, <a href="/A338090/b338090.txt">Table of n, a(n) for n = 1..10000</a>
%e A338090 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.
%p A338090 seq(`if`(numboccur(8, convert(n, base, 9))>0, n, NULL), n=0..100);
%t A338090 Select[ Range[ 0, 100 ], (Count[ IntegerDigits[ #, 9 ], 8 ]>0)& ]
%o A338090 (PARI) isok(m) = #select(x->(x==8), digits(m, 9)) >= 1;
%o A338090 (Python)
%o A338090 from gmpy2 import digits
%o A338090 def A338090(n):
%o A338090     def f(x):
%o A338090         l = (s:=digits(x,9)).find('8')
%o A338090         if l >= 0: s = s[:l]+'7'*(len(s)-l)
%o A338090         return n+int(s,8)
%o A338090     m, k = n, f(n)
%o A338090     while m != k: m, k = k, f(k)
%o A338090     return m # _Chai Wah Wu_, Dec 04 2024
%Y A338090 Cf. A007095 (base 9).
%Y A338090 Complement of A037477.
%Y A338090 Cf. A043485 (numbers with exactly one 8 in base 9).
%Y A338090 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).
%Y A338090 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).
%K A338090 nonn,base,easy
%O A338090 1,1
%A A338090 _François Marques_, Oct 09 2020