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

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A177718 a(n) = |(number of 1's in binary representation of prime(n)) - (number of 0's in binary representation of prime(n))|. 3
 0, 2, 1, 3, 2, 2, 1, 1, 3, 3, 5, 0, 0, 2, 4, 2, 4, 4, 1, 1, 1, 3, 1, 1, 1, 1, 3, 3, 3, 1, 7, 2, 2, 0, 0, 2, 2, 0, 2, 2, 2, 2, 6, 2, 0, 2, 2, 6, 2, 2, 2, 6, 2, 6, 5, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 3, 3, 1, 3, 5, 3, 5, 7, 1, 1, 1, 1, 1, 1, 5, 1, 5, 5, 1, 1, 3, 5, 3, 7, 5, 5, 5, 7, 7, 4, 2, 0, 2, 0, 0, 0, 2 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS FORMULA a(n) = abs(A014499(n) - A035103(n)). a(n) = abs(A037861(prime(n))). - R. J. Mathar, May 15 2010 EXAMPLE a(1)=0 because 2 = 10_2 and abs(1-1) = 0; a(2)=2 because 3 = 11_2 and abs(0-2) = 2; a(3)=1 because 5 = 101_2 and abs(1-2) = 1. MAPLE A023416 := proc(n) a := 0 ; for d in convert(n, base, 2) do if d = 0 then a := a+1 ; end if; end do; a ; end proc: A000120 := proc(n) a := 0 ; for d in convert(n, base, 2) do if d = 1 then a := a+1 ; end if; end do; a ; end proc: A037861 := proc(n) A023416(n)-A000120(n) ; end proc: A177718 := proc(n) abs(A037861(ithprime(n))) ; end proc: seq(A177718(n), n=1..120) ; # R. J. Mathar, May 15 2010 MATHEMATICA nzmnu[n_]:=Module[{z=DigitCount[n, 2, 0]}, Abs[2z-IntegerLength[n, 2]]]; nzmnu/@ Prime[Range[110]] (* Harvey P. Dale, Feb 15 2015 *) CROSSREFS Cf. A004676. Sequence in context: A277855 A136662 A023595 * A057515 A300712 A282463 Adjacent sequences:  A177715 A177716 A177717 * A177719 A177720 A177721 KEYWORD nonn AUTHOR Juri-Stepan Gerasimov, May 12 2010, May 18 2010 EXTENSIONS Corrected at three or more places by R. J. Mathar, May 15 2010 STATUS approved

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.

Last modified January 22 19:47 EST 2020. Contains 331153 sequences. (Running on oeis4.)