|
|
A132141
|
|
Numbers whose ternary representation begins with 1.
|
|
12
|
|
|
1, 3, 4, 5, 9, 10, 11, 12, 13, 14, 15, 16, 17, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
The lower and upper asymptotic densities of this sequence are 1/2 and 3/4, respectively. - Amiram Eldar, Feb 28 2021
|
|
LINKS
|
Bryan Brown, Michael Dairyko, Stephan Ramon Garcia, Bob Lutz and Michael Someck, Four quotient set gems, The American Mathematical Monthly, Vol. 121, No. 7 (2014), pp. 590-598; arXiv preprint, arXiv:1312.1036 [math.NT], 2013.
|
|
FORMULA
|
A number n is a term iff 3^m <= n < 2*3^m -1, for m=0,1,2,... - Zak Seidov, Mar 03 2009
a(n) = n + (3^floor(log_3(2*n)) - 1)/2. - Kevin Ryde, Feb 19 2022
|
|
MATHEMATICA
|
Flatten[(Range[3^#, 2 3^#-1])&/@Range[0, 4]] (* Zak Seidov, Mar 03 2009 *)
|
|
PROG
|
(PARI) s=[]; for(n=0, 4, for(x=3^n, 2*3^n-1, s=concat(s, x))); s \\ Zak Seidov, Mar 03 2009
(PARI) a(n) = n + 3^logint(n<<1, 3) >> 1; \\ Kevin Ryde, Feb 19 2022
(Haskell)
a132141 n = a132141_list !! (n-1)
a132141_list = filter ((== 1) . until (< 3) (flip div 3)) [1..]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|