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!)
A080087 Number of factors of 5 in the factorial of the n-th prime, counted with multiplicity. 6
0, 0, 1, 1, 2, 2, 3, 3, 4, 6, 7, 8, 9, 9, 10, 12, 13, 14, 15, 16, 16, 18, 19, 20, 22, 24, 24, 25, 25, 26, 31, 32, 33, 33, 35, 37, 38, 39, 40, 41, 43, 44, 46, 46, 47, 47, 51, 53, 55, 55, 56, 57, 58, 62, 63, 64, 65, 66, 68, 69, 69, 71, 75, 76, 76, 77, 81, 82, 84, 84, 86, 87, 89, 90 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
COMMENTS
Highest power of 5 dividing prime(n)! = A039716(n), or also the number of trailing end 0's in A039716(n). - Lekraj Beedassy, Oct 31 2010
LINKS
FORMULA
a(n) = Sum_{k=1..L} floor(prime(n)/5^k), where L = log(p_n)/log(5).
a(n) = A112765(A039716(n)). - Michel Marcus, Sep 28 2023
MAPLE
R:= NULL: v:= 0: p:= 0:
for i from 1 to 100 do
q:= p;
p:= nextprime(p);
v:= v + add(1+padic:-ordp(x, 5), x = 1+floor(q/5) .. floor(p/5));
R:= R, v;
od:
R; # Robert Israel, Sep 27 2023
MATHEMATICA
lst={}; Do[p=Prime[n]; s=0; While[p>1, p=IntegerPart[p/5]; s+=p; ]; AppendTo[lst, s], {n, 5!}]; lst (* Vladimir Joseph Stephan Orlovsky, Jul 28 2009 *)
PROG
(PARI) a(n) = valuation(prime(n)!, 5); \\ Michel Marcus, Jan 15 2015
CROSSREFS
Sequence in context: A129768 A210715 A072926 * A345163 A369728 A369986
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jan 26 2003
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 24 06:14 EDT 2024. Contains 371918 sequences. (Running on oeis4.)