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-2 of 2 results.

A134854 Least prime of the form 1 + p*2^n, where p is an odd prime.

Original entry on oeis.org

7, 13, 41, 113, 97, 193, 641, 769, 11777, 13313, 59393, 12289, 40961, 114689, 163841, 2424833, 6946817, 786433, 5767169, 7340033, 23068673, 155189249, 595591169, 1224736769, 167772161, 469762049, 2281701377, 3489660929, 12348030977
Offset: 1

Views

Author

T. D. Noe, Nov 13 2007

Keywords

Comments

a(n) least prime such that A098006(pi(a(n))) = 2^(n-1). See A134855 for the values of p.

Programs

  • Mathematica
    Table[Select[1+2^n*Prime[Range[2,100]], PrimeQ, 1][[1]], {n,41}]

A245462 a(1)=1, then a(n) is the smallest odd k > floor(a(n-1)/2)+1 such that k*2^n+1 is prime.

Original entry on oeis.org

1, 3, 5, 7, 11, 7, 5, 13, 15, 13, 9, 15, 23, 39, 35, 21, 21, 33, 27, 25, 33, 25, 45, 45, 33, 27, 15, 13, 23, 49, 35, 43, 99, 75, 59, 81, 63, 63, 81, 57, 99, 73, 51, 27, 35, 19, 27, 15, 23, 27, 17, 25, 51, 49, 35, 27, 29, 99, 71, 45
Offset: 1

Views

Author

Pierre CAMI, Jul 22 2014

Keywords

Comments

A134855(n) = smallest odd k such that k*2^n+1 is prime, the primes are not always in increasing order.
Here the primes k*2^n+1 are always in increasing order.
The ratio sum{k for n=1 to N}/sum{n for n=1 to N} is ~ 2*log(2) as N increases.

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{k = Floor[ a[n - 1]/2] + 2}, If[ EvenQ[k], k++]; While[ !PrimeQ[k*2^n + 1], k += 2]; k]; a[1] = 1; Array[a, 60] (* Robert G. Wilson v, Jul 26 2014 *)
  • PARI
    a=[1]; for(n=2, 100, k=floor(a[n-1]/2)+2; if(k%2==0, k++); t=2^n; while(!isprime(k*t+1), k+=2); a=concat(a, k)); a \\ Colin Barker, Jul 23 2014
Showing 1-2 of 2 results.