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.

A333656 Numbers having at least one 5 in their representation in base 6.

This page as a plain text file.
%I A333656 #24 Dec 06 2024 01:39:32
%S A333656 5,11,17,23,29,30,31,32,33,34,35,41,47,53,59,65,66,67,68,69,70,71,77,
%T A333656 83,89,95,101,102,103,104,105,106,107,113,119,125,131,137,138,139,140,
%U A333656 141,142,143,149,155,161,167,173,174,175,176,177,178,179,180,181,182,183,184
%N A333656 Numbers having at least one 5 in their representation in base 6.
%C A333656 Complementary sequence to A037465.
%H A333656 François Marques, <a href="/A333656/b333656.txt">Table of n, a(n) for n = 1..10000</a>
%e A333656 22 is not in the sequence since it is 34_6 in base 6, but 23 is in the sequence since it is 35_6 in base 6.
%p A333656 seq(`if`(numboccur(5, convert(n, base, 6))>0, n, NULL), n=0..100);
%t A333656 Select[ Range[ 0, 100 ], (Count[ IntegerDigits[ #, 6 ], 5 ]>0)& ]
%o A333656 (PARI) isok(m) = #select(x->(x==5), digits(m, 6)) >= 1;
%o A333656 (Python)
%o A333656 from gmpy2 import digits
%o A333656 def A333656(n):
%o A333656     def f(x):
%o A333656         l = (s:=digits(x,6)).find('5')
%o A333656         if l >= 0: s = s[:l]+'4'*(len(s)-l)
%o A333656         return n+int(s,5)
%o A333656     m, k = n, f(n)
%o A333656     while m != k: m, k = k, f(k)
%o A333656     return m # _Chai Wah Wu_, Dec 04 2024
%Y A333656 Cf. Numbers with at least one digit b-1 in base b : A074940 (b=3), A337250 (b=4), A337572 (b=5), this sequence (b=6), A337141 (b=7), A337239 (b=8), A338090 (b=9), A011539 (b=10), A095778 (b=11).
%Y A333656 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 A333656 nonn,base,easy
%O A333656 1,1
%A A333656 _François Marques_, Sep 20 2020