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.

A253398 Smallest odd k > 1 such that k*2^prime(n) + 1 is prime.

Original entry on oeis.org

3, 5, 3, 5, 9, 5, 9, 11, 45, 23, 35, 15, 3, 9, 27, 51, 27, 53, 9, 39, 23, 249, 51, 51, 131, 221, 29, 105, 321, 179, 5, 221, 111, 411, 191, 65, 83, 75, 95, 101, 147, 83, 149, 111, 203, 131, 9, 245, 281, 15, 83, 65, 299
Offset: 1

Views

Author

Pierre CAMI, Dec 31 2014

Keywords

Comments

For n < 1275, the ratio a(n)/prime(n) is always < 6 and on average ~0.7.
From Robert G. Wilson v, Jan 27 2015: (Start)
Records: 3, 5, 9, 11, 45, 51, 53, 249, 321, 411, 611, 1383, 1875, 2423, 4239, 4623, 6549, 7095, 8091, 9003, 10065, 10719, 18005, 18545, 19251, 21111, 25409, 39741, 49709, 54455, ..., .
a(n)=3 for n = 1, 3, 13, 71, ...;
a(n)=5 for n = 2, 4, 6, 31, 466, ...;
a(n)=9 for n = 5, 7, 14, 19, 47, 342, 1167, ...;
a(n)=11 for n = 8, ...; etc.
(End)

Examples

			3*2^2 + 1 = 13 (prime), so a(1)=3.
3*2^3 + 1 = 25 (composite), 5*2^3 + 1 = 41 (prime), so a(2)=5.
3*2^5 + 1 = 97 (prime), so a(3)=3.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 3, p = 2^Prime@ n}, While[ !PrimeQ[ k*p + 1], k += 2]; k]; Array[f, 53] (* Robert G. Wilson v, Jan 25 2015 *)
  • PARI
    a(n)=k=1;while(!isprime((2*k+1)*2^prime(n)+1),k++);2*k+1
    vector(100,n,a(n)) \\ Derek Orr, Dec 31 2014

Formula

a(n) = A247479(p_n). - Robert G. Wilson v, Jan 27 2015