login
A085238
Sort the numbers 2^i and 3^j. Then a(n) is the exponent of the n-th term.
5
0, 1, 1, 2, 3, 2, 4, 3, 5, 6, 4, 7, 5, 8, 9, 6, 10, 11, 7, 12, 8, 13, 14, 9, 15, 10, 16, 17, 11, 18, 19, 12, 20, 13, 21, 22, 14, 23, 15, 24, 25, 16, 26, 17, 27, 28, 18, 29, 30, 19, 31, 20, 32, 33, 21, 34, 22, 35, 36, 23, 37, 38, 24, 39, 25, 40, 41, 26, 42, 27, 43, 44, 28
OFFSET
1,4
COMMENTS
A006899(n) = A085239(n)^a(n);
a(A085240(n))=a(n).
PROG
(Haskell)
a085238 n = e (mod x 2 + 2) x where
x = a006899 n
e b p = if p == 1 then 0 else 1 + e b (p `div` b)
-- Reinhard Zumkeller, Oct 09 2013
(PARI) do(lim)=my(v=List(vector(logint(lim\=1, 2), i, 1<<i))); for(i=0, logint(lim, 3), listput(v, 3^i)); apply(n->my(t=valuation(n, 2)); if(t, t, valuation(n, 3)), Set(v)) \\ Charles R Greathouse IV, Sep 02 2015
CROSSREFS
Sequence in context: A026409 A336215 A243290 * A214371 A026338 A026242
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jun 22 2003
STATUS
approved