OFFSET
1,2
COMMENTS
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
REFERENCES
N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
Murray Klamkin and Joe Lipman, Problem E1238, Amer. Math. Monthly, 64 (1957), 367.
MATHEMATICA
Select[Range[0, 2000], IntegerLength[3^#] == IntegerLength[3^(#+1)] == IntegerLength[3^(#+2)]&] (* Jean-Fran�ois Alcover, Nov 24 2011 *)
Flatten[Position[Partition[IntegerLength[3^Range[0, 1100]], 3, 1], _?( Length[ Union[#]]==1&), {1}, Heads->False]]-1 (* Harvey P. Dale, Jan 31 2015 *)
SequencePosition[IntegerLength[3^Range[0, 1200]], {x_, x_, x_}][[All, 1]]-1 (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 12 2018 *)
PROG
(Haskell)
a001682 n = a001682_list !! (n-1)
a001682_list = [k | k <- [0..], let m = 3^k, a055642 m == a055642 (9*m)]
-- Reinhard Zumkeller, Oct 10 2011
CROSSREFS
KEYWORD
nonn,base,easy,nice
AUTHOR
EXTENSIONS
More terms from R. K. Guy and Emeric Deutsch, Mar 09 2005
STATUS
approved