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

A087576 Smallest number k > 1 such that k^n+2 is prime.

Original entry on oeis.org

3, 3, 3, 3, 9, 39, 9, 3, 11, 3, 15, 9, 9, 3, 3, 15, 5, 9, 63, 15, 27, 39, 41, 3, 51, 3, 59, 75, 119, 99, 71, 141, 209, 87, 65, 3, 275, 45, 23, 21, 27, 27, 69, 477, 59, 147, 231, 1605, 9, 291, 65, 15, 75, 57, 9, 225, 119, 273, 855, 33, 77, 513, 3, 219, 75, 51, 489, 369
Offset: 1

Views

Author

Amarnath Murthy, Sep 17 2003

Keywords

Comments

Some of the results were computed using the PrimeFormGW (PFGW) primality-testing program. - Hugo Pfoertner, Nov 16 2019

Crossrefs

Cf. A095302 (corresponding primes), A095303 (smallest k such that k^n-2 is prime), A095304 (corresponding primes).

Programs

  • Mathematica
    Table[k = 2; While[p = k^n + 2; ! PrimeQ[p], k++]; k, {n, 68}] (* T. D. Noe, Apr 03 2012 *)
  • PARI
    for(n=1,68,forstep(k=3,oo,2,if(isprime(k^n+2),print1(k,", ");break))) \\ Hugo Pfoertner, Oct 30 2018

Extensions

Corrected and extended by Hugo Pfoertner, computed using PFGW, Jun 01 2004
a(49) corrected by T. D. Noe, Apr 03 2012

A095303 Smallest number k such that k^n - 2 is prime.

Original entry on oeis.org

4, 2, 9, 3, 3, 3, 7, 7, 3, 21, 9, 7, 19, 5, 7, 39, 15, 61, 15, 19, 21, 3, 19, 17, 21, 5, 21, 7, 85, 17, 7, 21, 511, 27, 27, 59, 3, 19, 91, 45, 3, 29, 321, 65, 9, 379, 69, 125, 49, 5, 9, 45, 289, 341, 61, 89, 171, 171, 139, 21, 139, 75, 25, 49, 15, 51, 57, 175, 31, 137, 147, 25, 441
Offset: 1

Views

Author

Hugo Pfoertner, Jun 01 2004

Keywords

Comments

The Bunyakovsky conjecture implies a(n) exists for all n. - Robert Israel, Jul 15 2018
Some of the results were computed using the PrimeFormGW (PFGW) primality-testing program. - Hugo Pfoertner, Nov 16 2019

Examples

			a(1) = 4 because 4^1 - 2 = 2 is prime, a(3) = 9 because 3^3 - 2 = 25, 5^3 - 2 = 123 and 7^3 - 2 = 341 = 11 * 31 are composite, whereas 9^3 - 2 = 727 is prime.
		

Crossrefs

Cf. A095304 (corresponding primes), A087576 (smallest k such that k^n+2 is prime), A095302 (corresponding primes).
Cf. A014224.

Programs

  • Maple
    f:= proc(n) local k;
      for k from 3 by 2 do
        if isprime(k^n-2) then return k fi
      od
    end proc:
    f(1):= 4: f(2):= 2:
    map(f, [$1..100]); # Robert Israel, Jul 15 2018
  • Mathematica
    a095303[n_] := For[k = 1, True, k++, If[PrimeQ[k^n - 2], Return[k]]]; Array[a095303, 100] (* Jean-François Alcover, Mar 01 2019 *)
  • PARI
    for (n=1,73,for(k=1,oo,if(isprime(k^n-2),print1(k,", ");break))) \\ Hugo Pfoertner, Oct 28 2018

Extensions

a(2) and a(46) corrected by T. D. Noe, Apr 03 2012

A095302 Smallest prime of the form k^n+2 with k>1.

Original entry on oeis.org

3, 5, 11, 29, 83, 59051, 3518743763, 4782971, 6563, 2357947693, 59051, 8649755859377, 282429536483, 2541865828331, 4782971, 14348909, 6568408355712890627, 762939453127, 150094635296999123, 15398217140735709790332844752065729, 332525673007965087890627
Offset: 0

Views

Author

Hugo Pfoertner, Jun 01 2004

Keywords

Examples

			a(5) = 59051 because 9^5+2 is prime whereas 3^5+2 = 5*7^2, 5^5+2 = 53*59 and 7^5+2 = 3*13*431 are composite.
		

Crossrefs

Cf. A087576 (corresponding k).
Cf. A095303 and A095304 (for k^n-2).

Programs

  • Mathematica
    sp[n_]:=Module[{k=2},While[!PrimeQ[k^n+2],k++];k^n+2]; Array[sp,30,0] (* Harvey P. Dale, Feb 22 2012 *)

Extensions

More terms from Harvey P. Dale, Feb 22 2012

A204578 Primes of the form 5^k-2.

Original entry on oeis.org

3, 23, 6103515623, 1490116119384765623, 88817841970012523233890533447265623, 11754943508222875079687365372222456778186655567720875215087517062784172594547271728515623, 44841550858394146269559346665277316200968382140048504696226185084473314645947539247572422027587890623
Offset: 1

Views

Author

M. F. Hasler, Jan 30 2012

Keywords

Comments

See the sequence A109080 for the corresponding exponents k.
The number a(3) = 6103515623 is also in A095304, A104090 and A128472.

Crossrefs

Cf. A109080.

Programs

  • PARI
    for(i=0,999, ispseudoprime(t=5^i-2) & print1(t","))

Formula

a(n) = 5^A109080(n)-2.

A228727 Smallest prime of the form k*prime(n) + prime(k*n).

Original entry on oeis.org

7, 13, 23, 131, 179, 229, 283, 337, 107, 641, 317, 163, 643, 193, 1949, 523, 257, 2053, 1021, 1933, 2477, 773, 811, 401, 929, 6379, 457, 6197, 5701, 1747, 547, 1949, 1291, 2083, 647, 661, 2341, 709, 1579, 2549, 2633, 1721, 4909, 2851, 857, 877, 5441, 4441
Offset: 1

Views

Author

Irina Gerasimova, Aug 31 2013, Sep 04 2013

Keywords

Comments

Primes of the form 2*prime(n) + prime(2*n): 7, 13, 23, 107, 163, 193, 257, 401, 457, 547, 647, 661, 709, 857, 877, 1201,...

Examples

			a(1)=7 because 7 is prime and 2*prime(1) + prime(2*1) = 4 + 3 = 7.
a(2) = 13 because 13 is prime and 2*prime(2) + prime(2*2) = 6 + 7 = 13.
		

Crossrefs

Cf. A095304.

Programs

  • Mathematica
    Table[k = 1; While[p = k*Prime[n] + Prime[k*n]; ! PrimeQ[p], k++]; p, {n, 100}] (* T. D. Noe, Sep 03 2013 *)

Extensions

Corrected by R. J. Mathar, Sep 02 2013
Showing 1-5 of 5 results.