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.

A285888 Numbers n such that (1 + n)^n + (-n)^n is prime.

Original entry on oeis.org

0, 2, 3, 4, 5, 7, 167
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Apr 27 2017

Keywords

Comments

The next term, if it exists, is > 10000. - Hugo Pfoertner, Jan 06 2020
The associated primes are: 13, 37, 881, 4651, 1273609, ...
From Robert Israel, Apr 28 2017: (Start)
All terms other than 0 are primes or powers of 2.
Heuristically, this sequence might be expected to be finite. (End)

Examples

			4 is in this sequence because (1 + 4)^4 + (-4)^4 = 881 is prime.
		

Crossrefs

Supersequence of A098463.

Programs

  • Magma
    [n: n in [0..170]| IsPrime((n+1)^n + (-n)^n)];
    
  • Maple
    N:= 1000: # to get all terms <= N
    cands:= select(isprime, {seq(i,i=3..N,2)}) union {0, seq(2^k, k=1..ilog2(N))}:
    select(n -> isprime((1+n)^n + (-n)^n), cands); # Robert Israel, Apr 28 2017
  • PARI
    is(n)=ispseudoprime((n+1)^n+(-n)^n) \\ Charles R Greathouse IV, Apr 28 2017