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.

A337250 Numbers having at least one 3 in their representation in base 4.

This page as a plain text file.
%I A337250 #34 Dec 06 2024 01:37:59
%S A337250 3,7,11,12,13,14,15,19,23,27,28,29,30,31,35,39,43,44,45,46,47,48,49,
%T A337250 50,51,52,53,54,55,56,57,58,59,60,61,62,63,67,71,75,76,77,78,79,83,87,
%U A337250 91,92,93,94,95,99,103,107,108,109,110,111,112,113,114,115,116,117,118,119
%N A337250 Numbers having at least one 3 in their representation in base 4.
%C A337250 Complementary sequence of A023717.
%H A337250 François Marques, <a href="/A337250/b337250.txt">Table of n, a(n) for n = 1..10000</a>
%e A337250 18 is not in the sequence since it is 102_4 in base 4, but 19 is in the sequence since it is 103_4 in base 4.
%p A337250 seq(`if`(numboccur(3, convert(n, base, 4))>0, n, NULL), n=0..100);
%t A337250 Select[ Range[ 0, 100 ], (Count[ IntegerDigits[ #, 4 ], 3 ]>0)& ]
%o A337250 (PARI) isok(m) = #select(x->(x==3), digits(m, 4)) >= 1; \\ _Michel Marcus_, Sep 20 2020
%o A337250 (Python)
%o A337250 from gmpy2 import digits
%o A337250 def A337250(n):
%o A337250     def f(x):
%o A337250         l = (s:=digits(x,4)).find('3')
%o A337250         if l >= 0: s = s[:l]+'2'*(len(s)-l)
%o A337250         return n+int(s,3)
%o A337250     m, k = n, f(n)
%o A337250     while m != k: m, k = k, f(k)
%o A337250     return m # _Chai Wah Wu_, Dec 04 2024
%Y A337250 Cf. A196032 (at least one 0 in base 4).
%Y A337250 Cf. Numbers with at least one digit b-1 in base b : A074940 (b=3), this sequence, A337572 (b=5), A333656 (b=6), A337141 (b=7), A337239 (b=8), A338090 (b=9), A011539 (b=10), A095778 (b=11).
%Y A337250 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 A337250 nonn,base,easy
%O A337250 1,1
%A A337250 _François Marques_, Sep 19 2020