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.

A054895 a(n) = Sum_{k>0} floor(n/6^k).

This page as a plain text file.
%I A054895 #33 Feb 09 2023 14:20:11
%S A054895 0,0,0,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,3,4,4,4,4,4,4,5,5,5,5,
%T A054895 5,5,7,7,7,7,7,7,8,8,8,8,8,8,9,9,9,9,9,9,10,10,10,10,10,10,11,11,11,
%U A054895 11,11,11,12,12,12,12,12,12,14,14,14,14,14,14,15,15,15,15,15,15,16,16,16
%N A054895 a(n) = Sum_{k>0} floor(n/6^k).
%C A054895 Different from the highest power of 6 dividing n! (cf. A054861). - _Hieronymus Fischer_, Aug 14 2007
%C A054895 Partial sums of A122841. - _Hieronymus Fischer_, Jun 06 2012
%H A054895 Hieronymus Fischer, <a href="/A054895/b054895.txt">Table of n, a(n) for n = 0..10000</a>
%F A054895 a(n) = floor(n/6) + floor(n/36) + floor(n/216) + floor(n/1296) + ...
%F A054895 a(n) = (n - A053827(n))/5.
%F A054895 From _Hieronymus Fischer_, Aug 14 2007: (Start)
%F A054895 a(n) = a(floor(n/6)) + floor(n/6).
%F A054895 a(6*n) = n + a(n).
%F A054895 a(n*6^m) = n*(6^m-1)/5 + a(n).
%F A054895 a(k*6^m) = k*(6^m-1)/5, for 0 <= k < 6, m >= 0.
%F A054895 Asymptotic behavior:
%F A054895 a(n) = (n/5) + O(log(n)).
%F A054895 a(n+1) - a(n) = O(log(n)); this follows from the inequalities below.
%F A054895 a(n) <= (n-1)/5; equality holds for powers of 6.
%F A054895 a(n) >= ((n-5)/5) - floor(log_6(n)); equality holds for n=6^m-1, m>0.
%F A054895 lim inf (n/5 - a(n)) = 1/5, for n-->oo.
%F A054895 lim sup (n/5 - log_6(n) - a(n)) = 0, for n-->oo.
%F A054895 lim sup (a(n+1) - a(n) - log_6(n)) = 0, for n-->oo.
%F A054895 G.f.: (1/(1-x))*Sum_{k > 0} x^(6^k)/(1-x^(6^k)). (End)
%e A054895   a(10^0) = 0.
%e A054895   a(10^1) = 1.
%e A054895   a(10^2) = 18.
%e A054895   a(10^3) = 197.
%e A054895   a(10^4) = 1997.
%e A054895   a(10^5) = 19996.
%e A054895   a(10^6) = 199995.
%e A054895   a(10^7) = 1999995.
%e A054895   a(10^8) = 19999994.
%e A054895   a(10^9) = 199999993.
%t A054895 Table[t=0; p=6; While[s=Floor[n/p]; t=t+s; s>0, p *= 6]; t, {n,0,100}]
%o A054895 (Haskell)
%o A054895 a054895 n = a054895_list !! n
%o A054895 a054895_list = scanl (+) 0 a122841_list
%o A054895 -- _Reinhard Zumkeller_, Nov 10 2013
%o A054895 (Magma)
%o A054895 function A054895(n)
%o A054895   if n eq 0 then return n;
%o A054895   else return A054895(Floor(n/6)) + Floor(n/6);
%o A054895   end if; return A054895;
%o A054895 end function;
%o A054895 [A054895(n): n in [0..100]]; // _G. C. Greubel_, Feb 09 2023
%o A054895 (SageMath)
%o A054895 def A054895(n):
%o A054895     if (n==0): return 0
%o A054895     else: return A054895(n//6) + (n//6)
%o A054895 [A054895(n) for n in range(104)] # _G. C. Greubel_, Feb 09 2023
%Y A054895 Cf. A011371 and A054861 for analogs involving powers of 2 and 3.
%Y A054895 Cf. A053827, A054861, A054899, A067080, A098844, A122841, A132030.
%K A054895 nonn
%O A054895 0,13
%A A054895 _Henry Bottomley_, May 23 2000
%E A054895 An incorrect formula was deleted by _N. J. A. Sloane_, Nov 18 2008
%E A054895 Examples added by _Hieronymus Fischer_, Jun 06 2012