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 A132141 #31 Feb 19 2022 07:24:30 %S A132141 1,3,4,5,9,10,11,12,13,14,15,16,17,27,28,29,30,31,32,33,34,35,36,37, %T A132141 38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,81,82,83,84,85,86,87, %U A132141 88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108 %N A132141 Numbers whose ternary representation begins with 1. %C A132141 The lower and upper asymptotic densities of this sequence are 1/2 and 3/4, respectively. - _Amiram Eldar_, Feb 28 2021 %H A132141 Reinhard Zumkeller, <a href="/A132141/b132141.txt">Table of n, a(n) for n = 1..10000</a> %H A132141 Bryan Brown, Michael Dairyko, Stephan Ramon Garcia, Bob Lutz and Michael Someck, <a href="https://www.jstor.org/stable/10.4169/amer.math.monthly.121.07.590">Four quotient set gems</a>, The American Mathematical Monthly, Vol. 121, No. 7 (2014), pp. 590-598; <a href="http://arxiv.org/abs/1312.1036">arXiv preprint</a>, arXiv:1312.1036 [math.NT], 2013. %H A132141 Christian Mauduit, <a href="https://doi.org/10.1007/978-1-4757-4269-5_13">Propriétés arithmétiques des substitutions</a>, in Séminaire de Théorie des Nombres, Paris, 1989-90, pp. 177-190 (in French). %H A132141 <a href="/index/Ar#3-automatic">Index entries for 3-automatic sequences</a>. %F A132141 A number n is a term iff 3^m <= n < 2*3^m -1, for m=0,1,2,... - _Zak Seidov_, Mar 03 2009 %F A132141 a(n) = n + (3^floor(log_3(2*n)) - 1)/2. - _Kevin Ryde_, Feb 19 2022 %t A132141 Flatten[(Range[3^#,2 3^#-1])&/@Range[0,4]] (* _Zak Seidov_, Mar 03 2009 *) %o A132141 (PARI) s=[];for(n=0,4,for(x=3^n,2*3^n-1,s=concat(s,x)));s \\ _Zak Seidov_, Mar 03 2009 %o A132141 (PARI) a(n) = n + 3^logint(n<<1,3) >> 1; \\ _Kevin Ryde_, Feb 19 2022 %o A132141 (Haskell) %o A132141 a132141 n = a132141_list !! (n-1) %o A132141 a132141_list = filter ((== 1) . until (< 3) (flip div 3)) [1..] %o A132141 -- _Reinhard Zumkeller_, Feb 06 2015 %Y A132141 Cf. A007089, A132140, A157671, A131835. %K A132141 nonn,base,easy %O A132141 1,2 %A A132141 _Reinhard Zumkeller_, Aug 20 2007