login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A054896 a(n) = Sum_{k>0} floor(n/7^k). 12
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, 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, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,15
COMMENTS
Highest power of 7 dividing n!.
LINKS
FORMULA
a(n) = floor(n/7) + floor(n/49) + floor(n/343) + floor(n/2401) + ...
a(n) = (n - A053828(n))/6.
From Hieronymus Fischer, Aug 14 2007: (Start)
a(n) = a(floor(n/7)) + floor(n/7).
a(7*n) = n + a(n).
a(n*7^m) = a(n) + n*(7^m-1)/6.
a(k*7^m) = k*(7^m-1)/6, for 0 <= k < 7, m >= 0.
Asymptotic behavior:
a(n) = n/6 + O(log(n)).
a(n+1) - a(n) = O(log(n)); this follows from the inequalities below.
a(n) <= (n-1)/6; equality holds for powers of 7.
a(n) >= (n-6)/6 - floor(log_7(n)); equality holds for n=7^m-1, m>0. -
lim inf (n/6 - a(n)) = 1/6, for n-->oo.
lim sup (n/6 - log_7(n) - a(n)) = 0, for n-->oo.
lim sup (a(n+1) - a(n) - log_7(n)) = 0, for n-->oo.
G.f.: (1/(1-x))*Sum_{k > 0} x^(7^k)/(1-x^(7^k)). (End)
Partial sums of A214411. - R. J. Mathar, Jul 08 2021
EXAMPLE
a(10^0) = 0.
a(10^1) = 1.
a(10^3) = 16.
a(10^3) = 164.
a(10^4) = 1665.
a(10^5) = 16662.
a(10^6) = 166664.
a(10^7) = 1666661.
a(10^8) = 16666662.
a(10^9) = 166666661
MATHEMATICA
Table[t=0; p=7; While[s=Floor[n/p]; t=t+s; s>0, p *= 7]; t, {n, 0, 100}]
PROG
(Magma)
function A054896(n)
if n eq 0 then return n;
else return A054896(Floor(n/7)) + Floor(n/7);
end if; return A054896;
end function;
[A054896(n): n in [0..100]]; // G. C. Greubel, Feb 09 2023
(SageMath)
def A054896(n):
if (n==0): return 0
else: return A054896(n//7) + (n//7)
[A054896(n) for n in range(101)] # G. C. Greubel, Feb 09 2023
CROSSREFS
Cf. A011371 and A054861 for analogs involving powers of 2 and 3.
Sequence in context: A132270 A195174 A187185 * A052364 A052374 A003074
KEYWORD
nonn
AUTHOR
Henry Bottomley, May 23 2000
EXTENSIONS
Examples added by Hieronymus Fischer, Jun 06 2012
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 12:14 EDT 2024. Contains 371792 sequences. (Running on oeis4.)