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.

A374403 Number of n-bit primes.

This page as a plain text file.
%I A374403 #19 Mar 30 2025 04:22:25
%S A374403 0,2,2,2,5,7,13,23,43,75,137,255,464,872,1612,3030,5709,10749,20390,
%T A374403 38635,73586,140336,268216,513708,985818,1894120,3645744,7027290,
%U A374403 13561907,26207278,50697537,98182656,190335585,369323305,717267168,1394192236,2712103833,5279763824
%N A374403 Number of n-bit primes.
%C A374403 Number of primes whose binary expansion is n digits long.
%C A374403 a(n) is the number of primes in the half-open interval [2^(n-1), 2^n).
%C A374403 First differences of A185192.
%C A374403 See A007053 for additional information.
%F A374403 a(n) = A162145(n) for n >= 2. - _Amiram Eldar_, Jul 08 2024
%e A374403 a(1) = 0 because neither 0 nor 1 is a prime.
%e A374403 a(2) = 2 because the 2-bit primes are 10_2 = 2 and 11_2 = 3.
%e A374403 a(4) = 2 because the 4-bit primes are 1011_2 = 11 and 1101_2 = 13.
%t A374403 a[n_]:=Sum[Boole[PrimeQ[i]],{i,2^(n-1),2^n-1}]; Array[a,38] (* _Stefano Spezia_, Jul 07 2024 *)
%Y A374403 Essentially the same as A036378 and A162145.
%Y A374403 Cf. A185192 (partial sums).
%Y A374403 Cf. A000720, A007053.
%K A374403 nonn
%O A374403 1,2
%A A374403 _Jon E. Schoenfield_, Jul 07 2024