login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A014499 Number of 1's in binary representation of n-th prime. 42

%I

%S 1,2,2,3,3,3,2,3,4,4,5,3,3,4,5,4,5,5,3,4,3,5,4,4,3,4,5,5,5,4,7,3,3,4,

%T 4,5,5,4,5,5,5,5,7,3,4,5,5,7,5,5,5,7,5,7,2,4,4,5,4,4,5,4,5,6,5,6,5,4,

%U 6,6,4,6,7,6,7,8,4,5,4,5,5,5,7,5,7,7,4,5,6,7,6,8,7,7,7,8,8,3,4

%N Number of 1's in binary representation of n-th prime.

%C a(n) is the rank of prime(n) in the base-2 dominance order on the natural numbers. - _Tom Edgar_, Mar 25 2014

%H T. D. Noe, <a href="/A014499/b014499.txt">Table of n, a(n) for n=1..10000</a>

%H Tyler Ball and Daniel Juda, <a href="https://www.rose-hulman.edu/mathjournal/archives/2013/vol14-n2/paper2/v14n2-2pd.pdf">Dominance over N</a>, Rose-Hulman Undergraduate Mathematics Journal, Vol. 13, No. 2, Fall 2013.

%H Christian Elsholtz, <a href="http://arxiv.org/abs/1602.05974">Almost all primes have a multiple of small Hamming weight</a>, arXiv:1602.05974 [math.NT], 2016.

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%F a(n) = A000120(A000040(n)).

%F a(A049084(A061712(n))) = n. - _Reinhard Zumkeller_, Feb 10 2013

%F a(n) = [x^prime(n)] (1/(1 - x))*Sum_{k>=0} x^(2^k)/(1 + x^(2^k)). - _Ilya Gutkovskiy_, Mar 27 2018

%t f[n_] := Plus @@ IntegerDigits[n, 2]; lst = {}; Do[p = Prime[n];

%t AppendTo[lst, f[p]], {n, 6!}]; lst (* _Vladimir Joseph Stephan Orlovsky_, Oct 10 2009 *)

%t Table[Plus @@ IntegerDigits[Prime[n], 2], {n, 1, 100}] (* _Vincenzo Librandi_, Mar 25 2014 *)

%o (PARI) A014499(n)=norml2(binary(prime(n))) \\ _M. F. Hasler_, Nov 20 2009

%o (Haskell)

%o a014499 = a000120 . a000040 -- _Reinhard Zumkeller_, Feb 10 2013

%o (MAGMA) [&+Intseq(NthPrime(n), 2): n in [1..100] ]; // _Vincenzo Librandi_, Mar 25 2014

%o (Sage) [sum(i.digits(base=2)) for i in primes_first_n(200)] # _Tom Edgar_, Mar 25 2014

%Y Cf. A035103, A035100, A004676, A090455.

%Y Cf. A027697, A027699

%Y Cf. A180024. - _Reinhard Zumkeller_, Aug 08 2010

%Y Cf. A072084.

%K nonn,base,easy

%O 1,2

%A Ingemar Assarsjo (ingemar(AT)binomen.se)

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 18 04:44 EST 2019. Contains 329248 sequences. (Running on oeis4.)