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!)
A249751 Numbers n such that n - 2 divides n^n + 2. 3
3, 4, 7, 8, 67, 260, 379, 1191, 1471, 5076, 25807, 58591, 103780, 134947, 137347, 170587, 203236, 272611, 285391, 420211, 453748, 538735, 540856, 592411, 618451, 680707, 778807, 1163067, 1306936, 1520443, 1700947, 1891336, 2099203, 2831011, 3481960, 4020031 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
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
Sequence in context: A169943 A215110 A101715 * A169893 A169899 A328040
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Chai Wah Wu, Dec 06 2014
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 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)