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.

A264097 Smallest odd number k divisible by 3 such that k*2^n-1 is a prime.

Original entry on oeis.org

3, 3, 3, 3, 3, 15, 3, 3, 27, 45, 15, 3, 87, 9, 15, 9, 45, 15, 3, 51, 57, 9, 33, 69, 39, 57, 57, 21, 27, 45, 213, 15, 57, 147, 3, 33, 45, 21, 3, 63, 117, 15, 33, 3, 57, 165, 33, 213, 117, 69, 87, 21, 183, 147, 45, 3, 33, 51, 111, 45, 93, 69, 57, 9, 3, 99, 63
Offset: 0

Views

Author

Pierre CAMI, Nov 03 2015

Keywords

Comments

As N increases, (Sum_{n=1..N} a(n))/(Sum_{n=1..N} n) appears to tend to 2*log(2), as can be seen by plotting the first 31000 terms.
This observation is consistent with the prime number theorem as the probability that k*2^n-1 is prime where k is a multiple of 3 is 1/(2*(n*log(2)+log(k))) ~ 1/(2*n*log(2)).

Examples

			3*2^0-1=2 prime so a(0)=3.
3*2^1-1=5 prime so a(1)=3.
3*2^2-1=11 prime so a(2)=3.
3*2^3-1=23 prime so a(3)=3.
		

Crossrefs

Programs

  • Mathematica
    Table[k = 3; While[! PrimeQ[k 2^n - 1], k += 6]; k, {n, 0, 68}] (* Michael De Vlieger, Nov 03 2015 *)
  • PARI
    a(n) = {k = 3; while (!isprime(k*2^n-1), k += 6); k;} \\ Michel Marcus, Nov 03 2015