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.

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

A346156 Primes of the form x^k+x+1 where k >= 2 and x >= 1.

Original entry on oeis.org

3, 7, 11, 13, 19, 31, 43, 67, 73, 131, 157, 211, 223, 241, 307, 421, 463, 521, 601, 631, 733, 739, 757, 1123, 1303, 1483, 1723, 1741, 2551, 2971, 3307, 3391, 3541, 3907, 4099, 4423, 4831, 4931, 5113, 5701, 5851, 6007, 6163, 6481, 6571, 8011, 8191, 9283, 9901, 10303, 11131, 12211, 12433, 13807
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Jul 07 2021

Keywords

Comments

Primes p such that p-1 is in A253913.
Primes with more than one representation of this form include 31 = 3^3+3+1 = 5^2+5+1 and 131 = 2^7+2+1 = 5^3+5+1. Are there any others?
There are no others with more than one representation (except 3, trivially) < 10^19 (first 170385840 terms). - Michael S. Branicky, Jul 08 2021

Examples

			a(3) = 11 is a term because 11 = 2^3+2+1 and is prime.
		

Crossrefs

Programs

  • Maple
    N:= 10^8: # for terms <= N
    S:= {3}:
    for k from 2 to ilog2(N-1) do
      S:= S union select(t -> t<= N and isprime(t),{seq(x^k+x+1,x=2..floor(N^(1/k)))}):
    od:
    sort(convert(S,list));
  • Python
    from sympy import isprime
    def aupto(lim):
        xkx = set(x**k + x + 1 for k in range(2, lim.bit_length()) for x in range(int(lim**(1/k))+2))
        return sorted(filter(isprime, filter(lambda t: t<=lim, xkx)))
    print(aupto(14000)) # Michael S. Branicky, Jul 07 2021
Showing 1-2 of 2 results.