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.

A238904 Smallest k such that 2^k + (2n+1) and (2n+1)*2^k + 1 are both prime, k <= n, or -1 if no such k exists.

Original entry on oeis.org

0, 1, 1, 2, 1, 1, 2, 1, -1, 6, 1, -1, 2, 2, 1, -1, 6, 1, 2, 1, 1, 2, 9, -1, 2, 1, -1, 4, 2, -1, 12, 4, 1, 2, 1, 3, 6, 3, -1, 2, 1, -1, 4, 6, 9, 8, 2, 1, 2, 1, 3, -1, 1, -1, 6, 1, -1, 12, 6, 3, 12, 8, 1, 2, 3, 3, 4, 1, -1, -1, 3, -1, -1, 60, 3, 4, 2, 1, 12
Offset: 0

Views

Author

Keywords

Examples

			a(0) = 0 because 2^0 + (2*0+1) = 2 and (2*0+1)*2^0 + 1 = 2 are both prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Catch@Block[{k=0}, While[k <= n, If[PrimeQ[2^k + 2*n + 1] && PrimeQ[(2*n + 1)*2^k + 1], Throw@k]; k++]; -1]; a/@ Range[0,80] (* Giovanni Resta, Mar 15 2014 *)

A238749 Exponents of third Mersenne prime pair: numbers n such that 2^n - 5 and 5*2^n - 1 are both prime.

Original entry on oeis.org

4, 8, 10, 12, 18, 32
Offset: 1

Views

Author

Keywords

Comments

a(7) > 350028.
Intersection of A059608 and A001770.
Exponents of Mersenne prime pairs {2^n - (2k + 1), (2k + 1)*2^n - 1}:
for k = 0: 2, 3, 5, 7, 13, 17, ... Intersection of A000043 and A000043
for k = 1: 3, 4, 6, 94, ... Intersection of A050414 and A002235
for k = 2: 4, 8, 10, 12, 18, 32, ... Intersection of A059608 and A001770
for k = 3: Intersection of A059609 and A001771
for k = 4: 21, ... Intersection of A059610 and A002236
for k = 5: Intersection of A096817 and A001772
for k = 6: Intersection of A096818 and A001773
for k = 7: 5, 10, 14, ... Intersection of A059612 and A002237
for k = 8: 6, 16, 20, 36, ... Intersection of A059611 and A001774
for k = 9: 5, 21, ... Intersection of A096819 and A001775
for k = 10: 7, 13, ... Intersection of A096820 and A002238
for k = 11: 6, 8, 12, ...
for k = 12: 9, ...
for k = 13: 5, 8, 10, ...
for k = 14:

Examples

			a(1) = 4 because 2^4 - 5 = 11 and 5*2^4 - 1 = 79 are both primes.
		

Crossrefs

Programs

  • Magma
    [n: n in [0..100] | IsPrime(2^n-5) and IsPrime(5*2^n-1)]; // Vincenzo Librandi, May 17 2015
  • Mathematica
    fQ[n_] := PrimeQ[2^n - 5] && PrimeQ[5*2^n - 1]; k = 1; While[ k < 15001, If[fQ@ k, Print@ k]; k++] (* Robert G. Wilson v, Mar 05 2014 *)
    Select[Range[1000], PrimeQ[2^# - 5] && PrimeQ[5 2^# - 1] &] (* Vincenzo Librandi, May 17 2015 *)
  • PARI
    isok(n) = isprime(2^n - 5) && isprime(5*2^n - 1); \\ Michel Marcus, Mar 04 2014
    
Showing 1-2 of 2 results.