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
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
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.
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
KEYWORD
nonn
AUTHOR
Paul D. Hanna, Jan 26 2003
STATUS
approved