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!)
A090086 Smallest pseudoprime to base n, not necessarily exceeding n (cf. A007535). 18

%I #171 Jul 23 2019 21:08:57

%S 4,341,91,15,4,35,6,9,4,9,10,65,4,15,14,15,4,25,6,21,4,21,22,25,4,9,

%T 26,9,4,49,6,25,4,15,9,35,4,39,38,39,4,205,6,9,4,9,46,49,4,21,10,51,4,

%U 55,6,15,4,57,15,341,4,9,62,9,4,65,6,25,4,69,9,85,4,15,74,15,4,77,6,9,4,9,21,85,4,15,86,87,4,91,6

%N Smallest pseudoprime to base n, not necessarily exceeding n (cf. A007535).

%C If n-1 is composite, then a(n) < n. - _Thomas Ordowski_, Aug 08 2018

%C Conjecture: a(n) = A007535(n) for finitely many n. For n > 2; if a(n) > n, then n-1 is prime (find all these primes). - _Thomas Ordowski_, Aug 09 2018

%C It seems that if a(2^p) = p^2, then 2^p-1 is prime. - _Thomas Ordowski_, Aug 10 2018

%H Robert G. Wilson v, <a href="/A090086/b090086.txt">Table of n, a(n) for n = 1..10000</a> (first 1024 terms from Eric Chen)

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Pseudoprime">Pseudoprime</a>

%H <a href="/index/Ps#pseudoprimes">Index entries for sequences related to pseudoprimes</a>

%F a(n) = LeastComposite{x; n^(x-1) mod x = 1}.

%e From _Robert G. Wilson v_, Feb 26 2015: (Start)

%e a(n) = 4 for n = 1 + 4*k, k >= 0.

%e a(n) = 6 for n = 7 + 12*k, k >= 0.

%e a(n) = 9 for n = 8 + 18*k, 10 + 18*k, 35 + 36*k, k >= 0.

%e (End)

%e a(n) = 10 for n = 51 + 60*k, 11 + 180*k, 131 + 180*k, k >= 0.

%t f[n_] := Block[{k = 1}, While[ GCD[n, k] > 1 || PrimeQ[k] || PowerMod[n, k - 1, k] != 1, j = k++]; k]; Array[f, 91] (* _Robert G. Wilson v_, Feb 26 2015 *)

%o (PARI) /* a(n) <= 2000 is sufficient up to n = 10000 */

%o a(n) = for(k=2,2000,if((n^(k-1))%k==1 && !isprime(k), return(k))) \\ _Eric Chen_, Feb 22 2015

%o (PARI) a(n) = {forcomposite(k=2, , if (Mod(n,k)^(k-1) == 1, return (k)););} \\ _Michel Marcus_, Mar 02 2015

%Y Cf. A007535, A250200, A090085, A090087, A000790, A239293, A293203.

%Y Cf. A001567, A005935, A005936, A005937, A005938, A005939, A020136 - A020228.

%K nonn

%O 1,1

%A _Labos Elemer_, Nov 25 2003

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