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!)
A102457 Least k >= 2 with n^(kn) == n (mod kn), also n^(kn-1) == 1 (mod k). 5

%I #20 Nov 14 2018 08:11:55

%S 80519,2,3,2,5,2,7,2,3,2,11,2,13,2,3,2,17,2,19,2,3,2,23,2,5,2,3,2,29,

%T 2,31,2,3,2,5,2,37,2,3,2,41,2,43,2,3,2,47,2,7,2,3,2,53,2,5,2,3,2,59,2,

%U 61,2,3,2,5,2,67,2,3,2,71,2,73,2,3,2,7,2,79,2,3,2,83,2,5,2,3,2,89,2,7,2,3

%N Least k >= 2 with n^(kn) == n (mod kn), also n^(kn-1) == 1 (mod k).

%C Motivated by even base-2 pseudoprime 161038, I inquired into base-n pseudoprimes kn that are multiples of n, i.e., n^(kn) == n (mod kn). This is equivalent to n^(kn-1) == 1 (mod k) [_W. Edwin Clark_] and is satisfied by any k dividing n-1 [Michael Reid]. For n >= 3, this guarantees the existence of a(n) with 2 <= a(n) = k <= lpf(n-1) (lpf = least prime factor). For most n, a(n) = lpf(n-1), exceptional n and a(n) are noted in A102458 and A102459.

%H Antti Karttunen, <a href="/A102457/b102457.txt">Table of n, a(n) for n = 2..12620</a>

%H Antti Karttunen, <a href="/A102457/a102457.txt">Data supplement: n, a(n) computed for n = 2..100000</a>

%t Array[Block[{k = 2}, While[PowerMod[#, k # - 1, k] != 1, k++]; k] &, 93, 2] (* _Michael De Vlieger_, Nov 13 2018 *)

%o (PARI) A102457(n) = { for(k=2, oo, if(1==(Mod(n, k)^((k*n)-1)), return(k)); ); } \\ _Antti Karttunen_, Nov 10 2018

%Y Cf. A102458, A102459.

%Y Cf. A092067. - _R. J. Mathar_, Aug 30 2008

%K nonn

%O 2,1

%A _David W. Wilson_, Jan 09 2005

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 08:28 EDT 2024. Contains 371782 sequences. (Running on oeis4.)