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.

A084746 Smallest k such that n^k - k is a prime, or 0 if no such number exists.

Original entry on oeis.org

2, 1, 1, 2, 1, 2, 1, 2, 3, 18, 1, 2, 1, 2, 3, 6, 1, 2, 1, 2, 41, 110, 1, 18, 3, 2, 11, 2, 1, 24, 1, 2, 3, 2, 107827, 2, 1, 8, 3, 24, 1, 2, 1, 514, 6737, 2, 1, 2, 5521, 140, 15, 108, 1, 2, 15, 82, 35
Offset: 2

Views

Author

Amarnath Murthy and Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 15 2003

Keywords

Comments

Conjecture: no entry is zero.
If n is odd and greater than 3, k=a(n) is even. If n is an even composite number, k=a(n) is odd. For n>2, n and k=a(n) are coprime. - R. J. Mathar, Apr 02 2006, corrected by Farideh Firoozbakht, Aug 09 2014
a(36)>30000 or 0. a(37)..a(46) = 2, 1, 8, 3, 24, 1, 2, 1, 514, 6737. - Max Alekseyev, Apr 24 2009
If n-1 is prime then a(n)=1. - Farideh Firoozbakht, Aug 09 2014

Crossrefs

Cf. A084745.

Programs

  • Maple
    a := proc(n) local k; k := 1; while not isprime(n^k-k) do k := k+1 od; k end: seq(a(n),n=2..35);
  • Mathematica
    f[n_] := Block[{k = 1}, If[OddQ[n], k++ ]; While[ ! PrimeQ[n^k - k], k += 2]; k]; Table[ f[n], {n, 3, 35}]

Extensions

Edited and extended by Robert G. Wilson v, Alec Mihailovs (Alec(AT)Mihailovs.com) and T. D. Noe, Jun 16 2003
a(36)-a(58) from Kellen Shenton, Aug 14 2023

A343589 Smallest prime of the form n^k-(n-1) or 0 if no such prime exists.

Original entry on oeis.org

3, 7, 13, 3121, 31, 43, 549755813881, 73, 991, 1321, 248821, 157, 2731, 211, 241, 34271896307617, 307, 6841, 13107199999999999999981, 421, 463, 141050039560662968926081, 331753, 601, 17551, 7625597484961, 757, 1816075630094014572464024421543167816955354437761
Offset: 2

Views

Author

Blake Branstool, Apr 20 2021

Keywords

Comments

All values up to n=70 have been found and proved to be primes. n=71 has k=3019 and gives a probable prime.
See A113516, which gives the k values and is the main entry for these primes, for more extensively researched information. - Peter Munn, Nov 20 2021

Examples

			For n=2 and k=2, 2^2-(2-1)=3 thus a(2)=3. k is 2 as well for n=3,4.
For n=5 the first k to result in a prime is 5, 5^5-(5-1)=3121 thus a(5)=3121.
		

Crossrefs

A113516 gives the k values.

Programs

  • PARI
    a(n) = my(k=1, p); while (!isprime(p=n^k-(n-1)), k++); p; \\ Michel Marcus, Nov 17 2021

Extensions

Name revised by Peter Munn, Nov 16 2021
Showing 1-2 of 2 results.