cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A035100 Number of bits in binary expansion of n-th prime.

This page as a plain text file.
%I A035100 #44 Jun 13 2025 12:55:41
%S A035100 2,2,3,3,4,4,5,5,5,5,5,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,
%T A035100 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
%U A035100 9,9,9,9,9,9,9,9,9,9,9,9,9
%N A035100 Number of bits in binary expansion of n-th prime.
%H A035100 Jamie Morken, <a href="/A035100/b035100.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from G. C. Greubel)
%p A035100 Digits := 40: [ seq(1+floor(evalf(log(ithprime(n))/log(2))), n=1..100) ];
%t A035100 f[n_]:=Length[IntegerDigits[Prime[n],2]]; Table[f[n],{n,5!}] (* _Vladimir Joseph Stephan Orlovsky_, Feb 07 2010 *)
%t A035100 IntegerLength[Prime[Range[100]],2] (* _Harvey P. Dale_, Nov 10 2022 *)
%o A035100 (PARI) a(n)=#binary(prime(n)) \\ _Charles R Greathouse IV_, Sep 23 2012
%o A035100 (Python)
%o A035100 from sympy import prime
%o A035100 def A035100(n): return prime(n).bit_length() # _Chai Wah Wu_, Nov 19 2024
%Y A035100 Cf. A004676, A000523, A029837, A070939, A162145.
%K A035100 nonn,easy
%O A035100 1,1
%A A035100 _N. J. A. Sloane_