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

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A014499 Number of 1's in binary representation of n-th prime. 39
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

a(n) is the rank of prime(n) in the base-2 dominance order on the natural numbers. - Tom Edgar, Mar 25 2014

LINKS

T. D. Noe, Table of n, a(n) for n=1..10000

Tyler Ball and Daniel Juda, Dominance over N, Rose-Hulman Undergraduate Mathematics Journal, Vol. 13, No. 2, Fall 2013.

Christian Elsholtz, Almost all primes have a multiple of small Hamming weight, arXiv:1602.05974 [math.NT], 2016.

FORMULA

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

a(A049084(A061712(n))) = n. - Reinhard Zumkeller, Feb 10 2013

MATHEMATICA

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

AppendTo[lst, f[p]], {n, 6!}]; lst (* Vladimir Joseph Stephan Orlovsky, Oct 10 2009 *)

Table[Plus @@ IntegerDigits[Prime[n], 2], {n, 1, 100}] (* Vincenzo Librandi, Mar 25 2014 *)

PROG

(PARI) A014499(n)=norml2(binary(prime(n))) \\ M. F. Hasler, Nov 20 2009

(Haskell)

a014499 = a000120 . a000040  -- Reinhard Zumkeller, Feb 10 2013

(MAGMA) [&+Intseq(NthPrime(n), 2): n in [1..100] ]; // Vincenzo Librandi, Mar 25 2014

(Sage) [sum(i.digits(base=2)) for i in primes_first_n(200)] # Tom Edgar, Mar 25 2014

CROSSREFS

Cf. A035103, A035100, A004676, A090455.

Cf. A027697, A027699

Cf. A180024. - Reinhard Zumkeller, Aug 08 2010

Cf. A072084.

Sequence in context: A238268 A194883 A175453 * A055778 A106482 A260236

Adjacent sequences:  A014496 A014497 A014498 * A014500 A014501 A014502

KEYWORD

nonn,base,easy

AUTHOR

Ingemar Assarsjo (ingemar(AT)binomen.se)

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified November 20 00:42 EST 2017. Contains 294957 sequences.