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!)
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

%I #31 Sep 25 2018 05:13:53

%S 59,83,179,193,337,419,421,443,457,547,601,619,701,787,857,887,911,

%T 929,977,1039,1091,1093,1109,1193,1217,1223,1237,1259,1289,1439,1487,

%U 1489,1493,1613,1637,1657,1811,1847,1901,1993,1997,2003,2087,2089,2113,2377,2389,2423,2437,2477

%N 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.

%C 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.

%C There are far more efficient ways to determine if p is indeed in the list, described by Boyd, Martin, and Thom in their paper.

%H William Lewis Craig, <a href="/A283146/b283146.txt">Table of n, a(n) for n = 1..10052</a>

%H David W. Boyd, Greg Martin, and Mark Thom, <a href="http://arxiv.org/abs/1402.5148">Squarefree values of trinomial discriminants</a>, arXiv 1402.5148 [math.NT], 2014.

%t 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 *)

%o (PARI) isok(p) = {for (n=2, p*(p-1), if (((n^n + (-1)^n*(n-1)^(n-1)) % p^2) == 0, return (1)););}

%o lista(nn) = forprime(p=2, nn, if (isok(p), print1(p, ", "))) \\ _Michel Marcus_, Aug 01 2017

%Y Values of n for which square divisors occur are A238194.

%K nonn

%O 1,1

%A _William Lewis Craig_, Mar 01 2017

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 19 15:03 EDT 2024. Contains 371794 sequences. (Running on oeis4.)