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 A001682 M5109 N2213 #36 Feb 11 2021 23:00:33 %S A001682 0,21,42,65,86,109,130,151,174,195,218,239,262,283,304,327,348,371, %T A001682 392,415,436,457,480,501,524,545,568,589,610,633,654,677,698,721,742, %U A001682 763,786,807,830,851,874,895,916,939,960,983,1004,1027,1048 %N A001682 Numbers k such that 3^k, 3^(k+1) and 3^(k+2) have the same number of digits. %C A001682 Equivalently the fractional part of n*log(3) lies between 0 and 1 - 2*log(3), about 0.04576; 1 - 2*log(3) is also the density of the sequence. - Kevin Costello, Aug 08 2002 %D A001682 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence). %D A001682 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence). %H A001682 Reinhard Zumkeller, <a href="/A001682/b001682.txt">Table of n, a(n) for n = 1..1000</a> %H A001682 Murray Klamkin and Joe Lipman, <a href="https://www.jstor.org/stable/2309610">Problem E1238</a>, Amer. Math. Monthly, 64 (1957), 367. %t A001682 Select[Range[0, 2000], IntegerLength[3^#] == IntegerLength[3^(#+1)] == IntegerLength[3^(#+2)]&] (* _Jean-François Alcover_, Nov 24 2011 *) %t A001682 Flatten[Position[Partition[IntegerLength[3^Range[0,1100]],3,1],_?( Length[ Union[#]]==1&),{1},Heads->False]]-1 (* _Harvey P. Dale_, Jan 31 2015 *) %t A001682 SequencePosition[IntegerLength[3^Range[0,1200]],{x_,x_,x_}][[All,1]]-1 (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Dec 12 2018 *) %o A001682 (Haskell) %o A001682 a001682 n = a001682_list !! (n-1) %o A001682 a001682_list = [k | k <- [0..], let m = 3^k, a055642 m == a055642 (9*m)] %o A001682 -- _Reinhard Zumkeller_, Oct 10 2011 %Y A001682 First differences give A151910. %Y A001682 Cf. A055642, A000244. %K A001682 nonn,base,easy,nice %O A001682 1,2 %A A001682 _N. J. A. Sloane_ %E A001682 More terms from _R. K. Guy_ and _Emeric Deutsch_, Mar 09 2005