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

A058912 Numbers k such that k^k + k - 1 is prime.

Original entry on oeis.org

2, 3, 19, 30, 535, 1551, 7069, 8508
Offset: 1

Views

Author

Felice Russo, Jan 10 2001

Keywords

Comments

Except for the first term all terms are of the form 3k or 3k+1. - Farideh Firoozbakht, Oct 18 2006
Corresponding values of primes are in A187605. - Jaroslav Krizek, Nov 14 2013
If it exists, a(9) > 16100. - Hugo Pfoertner, Mar 02 2020
If it exists, a(9) > 31100. - Dmitry Petukhov, Sep 14 2021

Examples

			3 is a term because 3^3 + 3 - 1 = 29.
		

Crossrefs

Cf. A058911 (k^k + k + 1 is prime), A187605 (corresponding primes).

Programs

  • Mathematica
    Do[ If[ PrimeQ[ n^n + n - 1], Print[n]], {n, 1, 750} ]
  • PARI
    is(n)=ispseudoprime(n^n+n-1) \\ Charles R Greathouse IV, Feb 20 2017

Extensions

a(6) from Farideh Firoozbakht, Oct 18 2006
a(7)-a(8) from Hugo Pfoertner, Mar 02 2020

A161471 Primes of the form k^k + k + 1.

Original entry on oeis.org

2, 3, 7, 31, 46663, 387420499
Offset: 1

Views

Author

Keywords

Comments

The associated k are in A058911. - R. J. Mathar, Jun 12 2009
a(7) = 116035988662615798148247830...0301775295923724561430603629007 (1232 digits).

Crossrefs

Programs

  • Mathematica
    Unprotect[Power]; Power[0, 0] = 1; Protect[Power]; lst={}; Do[p=n^n+n+1; If[PrimeQ[p], AppendTo[lst,p]], {n,0,100}]; lst
    Join[{2},Select[Table[k^k+k+1,{k,1000}],PrimeQ]] (* Harvey P. Dale, Oct 09 2022 *)
  • PARI
    lista(nn) = for(k=0, nn, if(ispseudoprime(q=k^k+k+1), print1(q, ", "))); \\ Jinyuan Wang, Mar 01 2020

Formula

Intersection of A000040 and A066279. - R. J. Mathar, Jun 12 2009

Extensions

Definition simplified by R. J. Mathar, Jun 12 2009

A065797 Numbers k such that k^k - k + 1 is prime.

Original entry on oeis.org

2, 5, 13, 155, 1551, 1841, 2167, 2560
Offset: 1

Views

Author

Robert G. Wilson v, Dec 05 2001

Keywords

Comments

The Mathematica program tests for probable primality. It is unclear which of the numbers k^k - k + 1 have been proved prime. - Dean Hickerson, Apr 26 2003
The first four terms result from deterministic primality tests, while terms >= 156 currently correspond to probable primes. - Giuseppe Coppoletta, Dec 26 2014
If it exists, a(9) > 32000. - Dmitry Petukhov, Sep 12 2021

Crossrefs

Cf. A058911 (k^k+k+1), A182383 (corresponding primes, including 2 for k=0).

Programs

  • Maple
    select(n -> isprime(n^n-n+1), [$1..3000]); # Robert Israel, Dec 29 2014
  • Mathematica
    Do[If[PrimeQ[n^n-n+1], Print[n]], {n, 1, 3000}]
  • PARI
    is(n)=ispseudoprime(n^n-n+1) \\ Charles R Greathouse IV, Jun 13 2017
  • Sage
    [n for n in (1..155) if (n^n-n+1).is_prime(proof=True)]
    # deterministic test
    
  • Sage
    [n for n in (1..5000) if (n^n-n+1).is_prime(proof=False)]
    # probabilistic test Giuseppe Coppoletta, Dec 26 2014
    

Extensions

More terms from John Sillcox (JMS21187(AT)aol.com), Apr 23 2003
Showing 1-3 of 3 results.