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!)
A168155 Sum of binary digits of all primes < 2^n, i.e., with at most n binary digits. 1
0, 3, 8, 14, 32, 61, 117, 230, 470, 922, 1807, 3597, 7071, 14022, 27693, 54876, 109077, 216301, 430183, 854696, 1700412, 3382868, 6733230, 13404811, 26704639, 53204936, 106034897, 211377718, 421466683, 840573072, 1676670824, 3345012214, 6674425203, 13319553281 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Partial sums of A168156.
LINKS
FORMULA
a(n) = A095375( pi( 2^n-1 )), where pi = A000720.
EXAMPLE
No prime can be written with only 1 binary digit, thus a(1)=0.
The primes that can be written with 2 binary digits are 2 = 10[2] and 3 = 11[2], they have 3 nonzero bits, so a(2)=3.
Primes with 3 binary digits are 5 = 101[2] and 7 = 111[3]. They add 5 more nonzero bits to yield a(3) = a(2)+5 = 8.
PROG
(PARI) s=0; L=p=2; while( L*=2, print1(s", "); until( L<p=nextprime(p+1), s+=norml2(binary(p))))
CROSSREFS
Cf. A168153.
Sequence in context: A298612 A340627 A350520 * A005735 A208436 A297015
KEYWORD
nonn,base
AUTHOR
M. F. Hasler, Nov 20 2009
EXTENSIONS
a(25)-a(32) from Donovan Johnson, Jul 28 2010
a(33) from Chai Wah Wu, Apr 06 2020
a(34) from Chai Wah Wu, Apr 07 2020
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 23 12:44 EDT 2024. Contains 371913 sequences. (Running on oeis4.)