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!)
A158400 Primes of the form (n+1)^n-n^(n-1). 0

%I #11 Apr 22 2015 17:40:29

%S 7,7151,109873,956953279,3497141354765072424170242943188801

%N Primes of the form (n+1)^n-n^(n-1).

%C Next term too large to be included (1652 digits)

%e 3^2-2^1 = 9-2 = 7.

%p P:=proc(i) local a,n; for n from 2 by 1 to i do a:=n^(n-1)-(n-1)^(n-2); if isprime(a) then print(a); fi; od; end: P(2000);

%t Select[Table[(n + 1)^n - n^(n - 1), {n, 1000}], PrimeQ] (* _Michael De Vlieger_, Apr 22 2015 *)

%o (PARI) select(isprime, vector(9,n,(n+1)^n-n^(n-1))) \\ _Charles R Greathouse IV_, Apr 22 2015

%Y Primes in A178922.

%Y Cf. A054463.

%K easy,nonn

%O 1,1

%A _Paolo P. Lava_ & _Giorgio Balzarotti_, Mar 18 2009

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 March 29 02:23 EDT 2024. Contains 371264 sequences. (Running on oeis4.)