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!)
A213382 Numbers n such that n^n mod (n + 2) = n. 9
1, 4, 7, 13, 16, 19, 31, 37, 49, 55, 61, 67, 85, 91, 109, 121, 127, 139, 157, 175, 181, 193, 196, 199, 211, 217, 235, 247, 265, 289, 301, 307, 313, 319, 325, 337, 379, 391, 397, 409, 415, 445, 451, 469, 487, 499, 517, 535, 541, 571, 577, 589, 595, 631, 667, 679 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Equivalently, numbers n such that (n^n+2)/(n+2) is an integer. Derek Orr, May 23 2014
It was conjectured that A176003 is a subsequence.
Terms that do not appear in A176003: 16, 61, 193, 196, 313, 397, 691, 729, 769 ...
The conjecture is correct: verify the cases 1 and 3, then it suffices to show that (3p-2)^(3p-2) = 3p-2 mod 3 and mod p. Mod 3 the congruence is 1^(3p-2) = 1, and mod p the congruence is (-2)^(3p-2) = -2 which is true by Fermat's little theorem. - Charles R Greathouse IV, Sep 12 2012
a(62) = 729 is the first number not congruent to 1 mod 3. - Derek Orr, May 23 2014
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
A213381(n) = 7^7 mod 9 = 7, so 7 is in the sequence.
MATHEMATICA
Select[Range[700], PowerMod[#, #, #+2]==#&] (* Harvey P. Dale, Oct 03 2015 *)
PROG
(Python)
for n in range(999):
x = n**n % (n+2)
if x==n:
print(n, end=", ")
(PARI) is(n)=Mod(n, n+2)^n==n \\ Charles R Greathouse IV, Sep 12 2012
CROSSREFS
Cf. A213381 : a(n) = n^n mod (n+2).
Cf. A176003.
Sequence in context: A202822 A137827 A045090 * A258867 A074273 A310801
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Jun 10 2012
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 26 04:36 EDT 2024. Contains 371989 sequences. (Running on oeis4.)