A065891 The a(n)-th composite number is 2^n.
1, 3, 9, 20, 45, 96, 201, 414, 851, 1738, 3531, 7163, 14483, 29255, 58993, 118820, 239143, 480897, 966550, 1941540, 3898356, 7824444, 15699344, 31490742, 63151054, 126614174, 253804612, 508678161, 1019341795, 2042386082, 4091687074, 8196318785, 16416930072
Offset: 2
Keywords
Examples
For n = 4, 2^4 = 16 is the 9th composite number: 4,6,8,9,10,12,14,15,16, so a(4) = 9.
Programs
-
Maple
seq(2^k - numtheory:-pi(2^k)-1, k=2..28); # Robert Israel, Dec 10 2024
-
Mathematica
Do[s=Mod[2^n, c[n]]; If[s==0, Print[n]], {n, 2, 1000000}] Table[2^n-(PrimePi[2^n])-1, {n, 2, 31}]
-
PARI
lista(kmax) = {my(c = 0); forcomposite(k = 1, kmax, c++; if(k >> valuation(k, 2) == 1, print1(c, ", ")));} \\ Amiram Eldar, Jun 04 2024
Formula
a(n) = 2^n - A065855(2^n) - 1. - Robert Israel, Dec 10 2024
Extensions
Edited by Robert G. Wilson v, Jun 18 2002
a(32)-a(34) from Amiram Eldar, Jun 04 2024
Comments