|
|
A283146
|
|
Prime numbers p whose square divides a number of the form n^n + (-1)^n (n-1)^(n-1), where n is a positive integer.
|
|
1
|
|
|
59, 83, 179, 193, 337, 419, 421, 443, 457, 547, 601, 619, 701, 787, 857, 887, 911, 929, 977, 1039, 1091, 1093, 1109, 1193, 1217, 1223, 1237, 1259, 1289, 1439, 1487, 1489, 1493, 1613, 1637, 1657, 1811, 1847, 1901, 1993, 1997, 2003, 2087, 2089, 2113, 2377, 2389, 2423, 2437, 2477
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
For a given prime p, it has been proved that the set of all n for which p^2 divides n^n + (-1)^n (n-1)^(n-1) is some set of residue classes mod p(p-1). Therefore testing all values of n up to p(p-1) will determine whether p is in this list.
There are far more efficient ways to determine if p is indeed in the list, described by Boyd, Martin, and Thom in their paper.
|
|
LINKS
|
|
|
MATHEMATICA
|
Reap[For[p = 2, p < 1000, p = NextPrime[p], If[AnyTrue[Range[2, p(p-1)], Mod[PowerMod[#, #, p^2] + (-1)^# PowerMod[#-1, #-1, p^2], p^2] == 0&], Print[p]; Sow[p]]]][[2, 1]] (* Jean-François Alcover, Sep 25 2018 *)
|
|
PROG
|
(PARI) isok(p) = {for (n=2, p*(p-1), if (((n^n + (-1)^n*(n-1)^(n-1)) % p^2) == 0, return (1)); ); }
lista(nn) = forprime(p=2, nn, if (isok(p), print1(p, ", "))) \\ Michel Marcus, Aug 01 2017
|
|
CROSSREFS
|
Values of n for which square divisors occur are A238194.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|