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!)
A108879 Numbers n such that (n-1)*n^n+1 is prime. 2
2, 4, 20, 93, 100, 1536, 2835 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
2 is in the sequence because (2-1)*2^2+1 = 1*2^2+1 = 4+1 = 5, which is prime.
MATHEMATICA
Select[Range[1000], PrimeQ[(# - 1) #^# + 1] &] (* Vincenzo Librandi, Oct 23 2014 *)
PROG
(PARI) isok(n) = isprime((n-1)*n^n+1); \\ Michel Marcus, Oct 23 2014
(Magma) [n: n in [1..1000] |IsPrime((n-1)*n^n+1)]; // Vincenzo Librandi, Oct 23 2014
(Python)
from sympy import isprime
def afind(limit, startk=0):
for k in range(startk, limit+1):
if isprime((k-1)*k**k + 1):
print(k, end=", ")
afind(200) # Michael S. Branicky, Jan 01 2022
CROSSREFS
Cf. A108318.
Sequence in context: A325791 A188326 A158094 * A341855 A337038 A058006
KEYWORD
hard,more,nonn
AUTHOR
Ray G. Opao, Jul 14 2005
EXTENSIONS
a(7) from Michael S. Branicky, Jan 01 2022
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 24 05:49 EDT 2024. Contains 371918 sequences. (Running on oeis4.)