login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A122841 Greatest k such that 6^k divides n. 46

%I

%S 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,

%T 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,

%U 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

%N Greatest k such that 6^k divides n.

%C See A054895 for the partial sums. - _Hieronymus Fischer_, Jun 08 2012

%H Reinhard Zumkeller, <a href="/A122841/b122841.txt">Table of n, a(n) for n = 1..10000</a>

%F From _Hieronymus Fischer_, Jun 03 2012: (Start)

%F With m = floor(log_6(n)), frac(x) = x-floor(x):

%F a(n) = Sum_{j=1..m} (1 - ceiling(frac(n/6^j))).

%F a(n) = m + Sum_{j=1..m} (floor(-frac(n/6^j))).

%F a(n) = A054895(n) - A054895(n-1).

%F G.f.: Sum_{j>0} x^6^j/(1-x^6^j). (End)

%F a(A047253(n)) = 0; a(A008588(n)) > 0; a(A044102(n)) > 1. - _Reinhard Zumkeller_, Nov 10 2013

%F 6^a(n) = A234959(n), n >= 1. - _Wolfdieter Lang_, Jun 30 2014

%t Table[IntegerExponent[n, 6], {n, 1, 100}] (* _Amiram Eldar_, Sep 14 2020 *)

%o (Haskell)

%o a122841 = f 0 where

%o f y x = if r > 0 then y else f (y + 1) x'

%o where (x', r) = divMod x 6

%o -- _Reinhard Zumkeller_, Nov 10 2013

%Y Cf. A122840, A007814, A054895, A234959.

%K nonn

%O 1,36

%A _Reinhard Zumkeller_, Sep 13 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 4 07:25 EST 2021. Contains 341781 sequences. (Running on oeis4.)