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.
%I A337572 #42 Dec 06 2024 01:37:17 %S A337572 4,9,14,19,20,21,22,23,24,29,34,39,44,45,46,47,48,49,54,59,64,69,70, %T A337572 71,72,73,74,79,84,89,94,95,96,97,98,99,100,101,102,103,104,105,106, %U A337572 107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,129,134 %N A337572 Numbers having at least one 4 in their representation in base 5. %C A337572 Complementary sequence to A020654. %H A337572 François Marques, <a href="/A337572/b337572.txt">Table of n, a(n) for n = 1..10000</a> %e A337572 75 is not in the sequence since it is 300_5 in base 5, but 74 is in the sequence since it is 244_5 in base 5. %p A337572 seq(`if`(numboccur(4, convert(n, base, 5))>0, n, NULL), n=0..100); %t A337572 Select[ Range[ 0, 100 ], (Count[ IntegerDigits[ #, 5 ], 4 ]>0)& ] %o A337572 (PARI) isok(m) = #select(x->(x==4), digits(m, 5)) >= 1; \\ _Michel Marcus_, Sep 20 2020 %o A337572 (Python) %o A337572 from gmpy2 import digits %o A337572 def A337572(n): %o A337572 def f(x): %o A337572 l = (s:=digits(x,5)).find('4') %o A337572 if l >= 0: s = s[:l]+'3'*(len(s)-l) %o A337572 return n+int(s,4) %o A337572 m, k = n, f(n) %o A337572 while m != k: m, k = k, f(k) %o A337572 return m # _Chai Wah Wu_, Dec 04 2024 %Y A337572 Cf. Numbers with at least one digit b-1 in base b : A074940 (b=3), A337250 (b=4), this sequence (b=5), A333656 (b=6), A337141 (b=7), A337239 (b=8), A338090 (b=9), A011539 (b=10), A095778 (b=11). %Y A337572 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 A337572 nonn,base,easy %O A337572 1,1 %A A337572 _François Marques_, Sep 19 2020