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 A023717 #47 May 06 2025 09:25:47 %S A023717 0,1,2,4,5,6,8,9,10,16,17,18,20,21,22,24,25,26,32,33,34,36,37,38,40, %T A023717 41,42,64,65,66,68,69,70,72,73,74,80,81,82,84,85,86,88,89,90,96,97,98, %U A023717 100,101,102,104,105,106,128,129,130,132,133,134,136,137,138 %N A023717 Numbers with no 3's in base-4 expansion. %C A023717 A032925 is the intersection of this sequence and A023705; cf. A179888. - _Reinhard Zumkeller_, Jul 31 2010 %C A023717 Fixed point of the morphism: 0-> 0,1,2; 1-> 4,5,6; 2-> 8,9,10; ...; n-> 4n,4n+1,4n+2. - _Philippe Deléham_, Oct 22 2011 %H A023717 Reinhard Zumkeller, <a href="/A023717/b023717.txt">Table of n, a(n) for n = 0..10000</a> %F A023717 a(n) = Sum_{i=0..m} d(i)*4^i, where Sum_{i=0..m} d(i)*3^i is the base-3 representation of n. - _Clark Kimberling_ %F A023717 a(3n) = 4*a(n); a(3n+1) = 4*a(n)+1; a(3n+2) = 4*a(n)+2; a(n) = 4*a(floor(n/3)) + n - 3*floor(n/3). - _Benoit Cloitre_, Apr 27 2003 %F A023717 a(n) = Sum_{k>=0} A030341(n,k)*4^k. - _Philippe Deléham_, Oct 22 2011 %t A023717 Select[ Range[ 0, 140 ], (Count[ IntegerDigits[ #, 4 ], 3 ]==0)& ] %o A023717 (PARI) a(n)=if(n<1,0,if(n%3,a(n-1)+1,4*a(n/3))) %o A023717 (PARI) a(n)=if(n<1,0,4*a(floor(n/3))+n-3*floor(n/3)) %o A023717 (Haskell) %o A023717 a023717 n = a023717_list !! (n-1) %o A023717 a023717_list = filter f [0..] where %o A023717 f x = x < 3 || (q < 3 && f x') where (x', q) = divMod x 4 %o A023717 -- _Reinhard Zumkeller_, Apr 18 2015 %o A023717 (Julia) %o A023717 function a(n) %o A023717 m, r, b = n, 0, 1 %o A023717 while m > 0 %o A023717 m, q = divrem(m, 3) %o A023717 r += b * q %o A023717 b *= 4 %o A023717 end %o A023717 r end; [a(n) for n in 0:58] |> println # _Peter Luschny_, Jan 03 2021 %o A023717 (C) %o A023717 uint32_t a_next(uint32_t a_n) { %o A023717 uint32_t t = ((a_n ^ 0xaaaaaaaa) | 0x55555555) >> 1; %o A023717 return (a_n - t) & t; %o A023717 } // _Falk Hüffner_, Jan 22 2022 %o A023717 (Python) %o A023717 from gmpy2 import digits %o A023717 def A023717(n): return int(digits(n,3),4) # _Chai Wah Wu_, May 06 2025 %Y A023717 Cf. A032925, A023705, A179888. %K A023717 nonn,base,easy %O A023717 0,3 %A A023717 _Olivier Gérard_