login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS").
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A095375 Total number of 1's in the binary expansions of the first n primes: summatory A014499. 10

%I

%S 1,3,5,8,11,14,16,19,23,27,32,35,38,42,47,51,56,61,64,68,71,76,80,84,

%T 87,91,96,101,106,110,117,120,123,127,131,136,141,145,150,155,160,165,

%U 172,175,179,184,189,196,201,206,211,218,223,230,232,236,240,245,249,253

%N Total number of 1's in the binary expansions of the first n primes: summatory A014499.

%H Amiram Eldar, <a href="/A095375/b095375.txt">Table of n, a(n) for n = 1..10000</a>

%e n=4: first 4 primes={10,11,101,111}, with a(4)=8 digits 1.

%p read("transforms") :

%p A095375 := proc(n)

%p local a;

%p a := 0 ;

%p for i from 1 to n do

%p a := a+wt(ithprime(i)) ;

%p end do:

%p end proc: # _R. J. Mathar_, Jul 13 2012

%t lib[x_] :=Count[IntegerDigits[x, 2], 1] {s=0, ta=Table[0, {256}]}; Do[s=s+lib[Prime[n]]; ta[[n]]=s, {n, 1, 256}] ta

%o (PARI) a(n)=my(s);forprime(p=2,prime(n),s+=hammingweight(p));s \\ _Charles R Greathouse IV_, Mar 29 2013

%Y Cf. A000120, A000788, A079584, A014499.

%K nonn,base

%O 1,2

%A _Labos Elemer_, Jun 07 2004

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 23 17:26 EST 2020. Contains 338595 sequences. (Running on oeis4.)