A080085 Number of factors of 2 in the factorial of the n-th prime, counted with multiplicity.
1, 1, 3, 4, 8, 10, 15, 16, 19, 25, 26, 34, 38, 39, 42, 49, 54, 56, 64, 67, 70, 74, 79, 85, 94, 97, 98, 102, 104, 109, 120, 128, 134, 135, 145, 146, 152, 159, 162, 168, 174, 176, 184, 190, 193, 194, 206, 216, 222, 224, 228, 232, 236, 244, 255, 259, 265, 266, 273, 277
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10000 (first 1000 terms from Vincenzo Librandi)
Crossrefs
Programs
-
Mathematica
lst={};Do[p=Prime[n];s=0;While[p>1,p=IntegerPart[p/2];s+=p;];AppendTo[lst,s],{n,5!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 28 2009 *)
-
PARI
vector(58, n, valuation(prime(n)!, 2)) \\ Arkadiusz Wesolowski, Feb 22 2014
-
PARI
a(n) = prime(n) - hammingweight(prime(n)); \\ Joerg Arndt, Feb 22 2014
Formula
a(n) = Sum_{k=1..L} floor( p_n /2^k ), where L = log(p_n)/log(2), where p_n is the n-th prime.
Comments