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.

A158400 Primes of the form (k+1)^k - k^(k-1).

Original entry on oeis.org

7, 7151, 109873, 956953279, 3497141354765072424170242943188801
Offset: 1

Views

Author

Keywords

Comments

Next term too large to be included (1652 digits)

Examples

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

Crossrefs

Primes in A178922.
Cf. A054463.

Programs

  • Maple
    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);
  • Mathematica
    Select[Table[(n + 1)^n - n^(n - 1), {n, 1000}], PrimeQ] (* Michael De Vlieger, Apr 22 2015 *)
  • PARI
    select(isprime, vector(9,n,(n+1)^n-n^(n-1))) \\ Charles R Greathouse IV, Apr 22 2015