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.

A247202 Smallest odd k > 1 such that k*2^n - 1 is a prime number.

Original entry on oeis.org

3, 3, 3, 3, 7, 3, 3, 5, 7, 5, 3, 5, 9, 5, 9, 17, 7, 3, 51, 17, 7, 33, 13, 39, 57, 11, 21, 27, 7, 213, 15, 5, 31, 3, 25, 17, 21, 3, 25, 107, 15, 33, 3, 35, 7, 23, 31, 5, 19, 11, 21, 65, 147, 5, 3, 33, 51, 77, 45, 17, 69, 53, 9, 3, 67, 63, 43, 63, 51, 27, 73, 5
Offset: 1

Views

Author

Pierre CAMI, Nov 25 2014

Keywords

Comments

Limit_{N->oo} (Sum_{n=1..N} a(n))/(Sum_{n=1..N} n) = log(2). [[Is there a proof or is this a conjecture? - Peter Luschny, Feb 06 2015]]
Records: 3, 7, 9, 17, 51, 57, 213, 255, 267, 321, 615, 651, 867, 901, 909, 1001, 1255, 1729, 1905, 2163, 3003, 3007, 3515, 3797, 3825, 4261, 4335, 5425, 5717, 6233, 6525, 6763, 11413, 11919, 12935, 20475, 20869, 25845, 30695, 31039, 31309, 42991, 55999, ... . - Robert G. Wilson v, Feb 08 2015

Crossrefs

Programs

  • Maple
    f:= proc(n)
    local k,p;
      p:= 2^n;
    for k from 3 by 2 do if isprime(k*p-1) then return k fi od;
    end proc:
    seq(f(n), n=1 .. 100); # Robert Israel, Feb 05 2015
  • Mathematica
    f[n_] := Block[{k = 3, p = 2^n}, While[ !PrimeQ[k*p - 1], k += 2]; k]; Array[f, 70]
  • PARI
    a(n) = {k=3; while (!isprime(k*2^n-1), k+=2); k;} \\ Michel Marcus, Nov 25 2014

Formula

a(A002235(n)) = 3.