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!)
A240532 Numbers k such that (k+1)^(k-1) - k is prime. 0
3, 5, 8, 17, 30, 66, 86, 100, 122, 160, 2282, 6508 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(13) >= 8394. - J.W.L. (Jan) Eerland, Dec 23 2021
LINKS
EXAMPLE
3 is in the sequence since (3+1)^(3-1) - 3 = 4^2 - 3 = 13 is prime.
MATHEMATICA
Select[Range[0, 500], PrimeQ[(# + 1)^(# - 1) - #] &].
n=0; Monitor[Parallelize[While[True, If[PrimeQ[(n+1)^(n-1)-n], Print[n]]; n++]; n], n] (* J.W.L. (Jan) Eerland, Dec 23 2021 *)
PROG
(Magma) [n: n in [1..500] | IsPrime((n+1)^(n-1)-n)];
(PARI) is(n)=isprime((n+1)^(n-1)-n) \\ Charles R Greathouse IV, Jun 13 2017
(Python)
from sympy import isprime
def afind(limit, startk=1):
for k in range(startk, limit+1):
if isprime((k+1)**(k-1) - k): print(k, end=", ")
afind(200) # Michael S. Branicky, Aug 17 2021
CROSSREFS
Cf. A238378.
Sequence in context: A080006 A174011 A291223 * A184434 A196140 A336016
KEYWORD
nonn,more
AUTHOR
Vincenzo Librandi, Apr 13 2014
EXTENSIONS
a(11) from Michael S. Branicky, Aug 17 2021
STATUS
approved

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 April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)