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!)
A300477 Number of positive integers k with 1 < k < n such that n^k + k^n is prime. 2

%I

%S 0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,1,0,0,

%T 0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,

%U 0,0,0,0,0,1,1,0,0,0,0,1,0,0,0,0,0,1,0

%N Number of positive integers k with 1 < k < n such that n^k + k^n is prime.

%C a(n) > 0 iff n is a term of A162488.

%C a(n) > 1 iff n is a term of A300478.

%H Robert Israel, <a href="/A300477/b300477.txt">Table of n, a(n) for n = 2..1940</a>

%p f:= n -> nops(select(isprime, [seq(n^k-k^n,k=2..n-1)])):

%p map(f, [$2..100]); # _Robert Israel_, Sep 24 2020

%o (PARI) a(n) = my(i=0); for(k=2, n-1, if(ispseudoprime(n^k+k^n), i++)); i

%Y Cf. A162488, A300478.

%K nonn

%O 2

%A _Felix Fröhlich_, Mar 06 2018

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 May 29 08:14 EDT 2022. Contains 354124 sequences. (Running on oeis4.)