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.

A249382 Smallest odd prime Q such that Q*2^prime(n)-1 is also a prime number.

Original entry on oeis.org

3, 3, 7, 3, 3, 31, 7, 61, 13, 7, 43, 31, 19, 3, 31, 307, 733, 79, 43, 73, 421, 73, 181, 19, 157, 181, 3, 739, 421, 127, 103, 73, 571, 421, 109, 211, 1459, 103, 1693, 487, 829, 139, 1153, 439, 3067, 601, 199, 853, 421, 3541, 1069, 1279, 1297
Offset: 1

Views

Author

Pierre CAMI, Oct 27 2014

Keywords

Examples

			3*2^2-1=11 prime so a(1)=3 as 2 is prime(1).
3*2^3-1=23 prime so a(2)=3 as 3 is prime(2).
3*2^5-1=95 composite.
5*2^5-1=159 composite.
7*2^5-1=223 prime so a(3)=7 as 5 is prime(3).
		

Crossrefs

Programs

  • Mathematica
    a249382[n_Integer] := Module[{q = 2}, While[! PrimeQ[Prime[q]*2^Prime[n] - 1], q++]; Prime[q]]; a249382/@Range[53] (* Michael De Vlieger, Nov 12 2014 *)
  • PARI
    listp(nn) = {for (n=1, nn, k=2; while(!isprime(prime(k)*2^prime(n)-1), k++); print1(prime(k), ", "););} \\ Michel Marcus, Oct 27 2014

A249384 Smallest odd prime number Q such that Q*2^P+1 is also prime, where P is a Mersenne prime exponent A000043(n).

Original entry on oeis.org

3, 5, 3, 5, 5, 53, 11, 239, 53, 191, 1229, 5, 233, 347, 1367, 9767, 2063, 89, 14009, 3329, 19991, 50849, 2711, 337871, 46301, 2543, 413093, 1157111, 615161, 1138649, 3778427
Offset: 1

Views

Author

Pierre CAMI, Oct 27 2014

Keywords

Crossrefs

Programs

  • PARI
    lista(nn) = {vmp = readvec("b000043.txt"); for (n=1, nn, k=2; while(!isprime(prime(k)*2^vmp[n]+1), k++); print1(prime(k), ", "););} \\ Michel Marcus, Oct 27 2014
Showing 1-2 of 2 results.