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.

Showing 1-1 of 1 results.

A065891 The a(n)-th composite number is 2^n.

Original entry on oeis.org

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

Views

Author

Labos Elemer, Nov 28 2001

Keywords

Comments

Index of n-th power of 2 in A002808.
Remainder of division 2^n/c(n) equals zero, where c(n) = A002808(n), the n-th composite number.
Exponential increase with a factor > 2 and approaching two.

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.
		

Crossrefs

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
Showing 1-1 of 1 results.