login
A080085
Number of factors of 2 in the factorial of the n-th prime, counted with multiplicity.
7
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,3
COMMENTS
n-th prime minus number of 1's in binary representation of n-th prime. [Juri-Stepan Gerasimov, May 17 2010]
LINKS
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.
a(n) = A000040(n) - A014499(n). [Juri-Stepan Gerasimov, May 17 2010]
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 *)
PROG
(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
CROSSREFS
Cf. A276133 (first differences).
Sequence in context: A075751 A065153 A030497 * A182276 A063414 A265611
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jan 26 2003
STATUS
approved