OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..160
EXAMPLE
3 is in this sequence because (3^3 + 2)/(3 - 2) = 29 is an integer.
MATHEMATICA
fQ[n_] := Mod[ PowerMod[ n, n, n - 2] + 2, n - 2] == 0; Select[ Range@ 4100000, fQ] (* Robert G. Wilson v, Dec 19 2014 *)
PROG
(Magma) [n: n in [3..10000] | Denominator((n^n+2)/(n-2)) eq 1];
(Python)
A249751_list = [n for n in range(3, 10**7) if n==3 or pow(n, n, n-2) == n-4]
# Chai Wah Wu, Dec 06 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Dec 05 2014
EXTENSIONS
More terms from Chai Wah Wu, Dec 06 2014
STATUS
approved