login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A285888 Numbers n such that (1 + n)^n + (-n)^n is prime. 3

%I #20 Jan 02 2023 12:30:53

%S 0,2,3,4,5,7,167

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

%C The next term, if it exists, is > 10000. - _Hugo Pfoertner_, Jan 06 2020

%C The associated primes are: 13, 37, 881, 4651, 1273609, ...

%C From _Robert Israel_, Apr 28 2017: (Start)

%C All terms other than 0 are primes or powers of 2.

%C Heuristically, this sequence might be expected to be finite. (End)

%H J. S. Gerasimov, <a href="http://list.seqfan.eu/oldermail/seqfan/2014-August/013480.html">x^(y + 1) - y^x</a>, SeqFan list, Aug 18 2014.

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

%p N:= 1000: # to get all terms <= N

%p cands:= select(isprime, {seq(i,i=3..N,2)}) union {0, seq(2^k, k=1..ilog2(N))}:

%p select(n -> isprime((1+n)^n + (-n)^n), cands); # _Robert Israel_, Apr 28 2017

%o (Magma) [n: n in [0..170]| IsPrime((n+1)^n + (-n)^n)];

%o (PARI) is(n)=ispseudoprime((n+1)^n+(-n)^n) \\ _Charles R Greathouse IV_, Apr 28 2017

%Y Supersequence of A098463.

%Y Cf. A243100, A285886, A285887.

%K nonn,more

%O 1,2

%A _Juri-Stepan Gerasimov_, Apr 27 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 20 06:44 EDT 2024. Contains 375311 sequences. (Running on oeis4.)