cp's OEIS Frontend

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.

A122841 Greatest k such that 6^k divides n.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 13 2006

Keywords

Comments

See A054895 for the partial sums. - Hieronymus Fischer, Jun 08 2012

Crossrefs

Programs

  • Haskell
    a122841 = f 0 where
       f y x = if r > 0 then y else f (y + 1) x'
               where (x', r) = divMod x 6
    -- Reinhard Zumkeller, Nov 10 2013
    
  • Mathematica
    Table[IntegerExponent[n, 6], {n, 1, 100}] (* Amiram Eldar, Sep 14 2020 *)
  • PARI
    a(n) = valuation(n, 6); \\ Michel Marcus, Jan 17 2022

Formula

From Hieronymus Fischer, Jun 03 2012: (Start)
With m = floor(log_6(n)), frac(x) = x-floor(x):
a(n) = Sum_{j=1..m} (1 - ceiling(frac(n/6^j))).
a(n) = m + Sum_{j=1..m} (floor(-frac(n/6^j))).
a(n) = A054895(n) - A054895(n-1).
G.f.: Sum_{j>0} x^6^j/(1-x^6^j). (End)
a(A047253(n)) = 0; a(A008588(n)) > 0; a(A044102(n)) > 1. - Reinhard Zumkeller, Nov 10 2013
6^a(n) = A234959(n), n >= 1. - Wolfdieter Lang, Jun 30 2014
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1/5. - Amiram Eldar, Jan 17 2022
a(n) = min(A007814(n), A007949(n)). - Jianing Song, Jul 23 2022