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.

A054896 a(n) = Sum_{k>0} floor(n/7^k).

This page as a plain text file.
%I A054896 #38 Oct 08 2024 20:55:34
%S A054896 0,0,0,0,0,0,0,1,1,1,1,1,1,1,2,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,4,4,4,4,
%T A054896 4,5,5,5,5,5,5,5,6,6,6,6,6,6,6,8,8,8,8,8,8,8,9,9,9,9,9,9,9,10,10,10,
%U A054896 10,10,10,10,11,11,11,11,11,11,11,12,12,12,12,12,12,12,13,13,13,13,13,13
%N A054896 a(n) = Sum_{k>0} floor(n/7^k).
%C A054896 Exponent of the highest power of 7 dividing n!.
%H A054896 Hieronymus Fischer, <a href="/A054896/b054896.txt">Table of n, a(n) for n = 0..10000</a>
%F A054896 a(n) = floor(n/7) + floor(n/49) + floor(n/343) + floor(n/2401) + ...
%F A054896 a(n) = (n - A053828(n))/6.
%F A054896 From _Hieronymus Fischer_, Aug 14 2007: (Start)
%F A054896 a(n) = a(floor(n/7)) + floor(n/7).
%F A054896 a(7*n) = n + a(n).
%F A054896 a(n*7^m) = a(n) + n*(7^m-1)/6.
%F A054896 a(k*7^m) = k*(7^m-1)/6, for 0 <= k < 7, m >= 0.
%F A054896 Asymptotic behavior:
%F A054896 a(n) = n/6 + O(log(n)).
%F A054896 a(n+1) - a(n) = O(log(n)); this follows from the inequalities below.
%F A054896 a(n) <= (n-1)/6; equality holds for powers of 7.
%F A054896 a(n) >= (n-6)/6 - floor(log_7(n)); equality holds for n=7^m-1, m>0. -
%F A054896 lim inf (n/6 - a(n)) = 1/6, for n-->oo.
%F A054896 lim sup (n/6 - log_7(n) - a(n)) = 0, for n-->oo.
%F A054896 lim sup (a(n+1) - a(n) - log_7(n)) = 0, for n-->oo.
%F A054896 G.f.: (1/(1-x))*Sum_{k > 0} x^(7^k)/(1-x^(7^k)). (End)
%F A054896 Partial sums of A214411. - _R. J. Mathar_, Jul 08 2021
%F A054896 a(n) = A214411(A000142(n)). - _Michel Marcus_, Oct 07 2024
%e A054896   a(10^0) = 0.
%e A054896   a(10^1) = 1.
%e A054896   a(10^3) = 16.
%e A054896   a(10^3) = 164.
%e A054896   a(10^4) = 1665.
%e A054896   a(10^5) = 16662.
%e A054896   a(10^6) = 166664.
%e A054896   a(10^7) = 1666661.
%e A054896   a(10^8) = 16666662.
%e A054896   a(10^9) = 166666661
%t A054896 Table[t=0; p=7; While[s=Floor[n/p]; t=t+s; s>0, p *= 7]; t, {n,0,100}]
%o A054896 (Magma)
%o A054896 function A054896(n)
%o A054896   if n eq 0 then return n;
%o A054896   else return A054896(Floor(n/7)) + Floor(n/7);
%o A054896   end if; return A054896;
%o A054896 end function;
%o A054896 [A054896(n): n in [0..100]]; // _G. C. Greubel_, Feb 09 2023
%o A054896 (SageMath)
%o A054896 def A054896(n):
%o A054896     if (n==0): return 0
%o A054896     else: return A054896(n//7) + (n//7)
%o A054896 [A054896(n) for n in range(101)] # _G. C. Greubel_, Feb 09 2023
%o A054896 (PARI) a(n)=(n-sumdigits(n, 7))\6 \\ _Alan Michael Gómez Calderón_, Oct 08 2024
%Y A054896 Cf. A011371 and A054861 for analogs involving powers of 2 and 3.
%Y A054896 Cf. A053828, A054893, A054895, A054899, A067080, A098844, A132031, A214411.
%Y A054896 Cf. A000142, A214411.
%K A054896 nonn
%O A054896 0,15
%A A054896 _Henry Bottomley_, May 23 2000
%E A054896 Examples added by _Hieronymus Fischer_, Jun 06 2012