The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
If n-1 is composite, then a(n) < n. - Thomas Ordowski, Aug 08 2018
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
It seems that if a(2^p) = p^2, then 2^p-1 is prime. - Thomas Ordowski, Aug 10 2018
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..10000 (first 1024 terms from Eric Chen)
Wikipedia, Pseudoprime
FORMULA
a(n) = LeastComposite{x; n^(x-1) mod x = 1}.
EXAMPLE
From Robert G. Wilson v, Feb 26 2015: (Start)
a(n) = 4 for n = 1 + 4*k, k >= 0.
a(n) = 6 for n = 7 + 12*k, k >= 0.
a(n) = 9 for n = 8 + 18*k, 10 + 18*k, 35 + 36*k, k >= 0.
(End)
a(n) = 10 for n = 51 + 60*k, 11 + 180*k, 131 + 180*k, k >= 0.
MATHEMATICA
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 *)
PROG
(PARI) /* a(n) <= 2000 is sufficient up to n = 10000 */
a(n) = for(k=2, 2000, if((n^(k-1))%k==1 && !isprime(k), return(k))) \\ Eric Chen, Feb 22 2015
(PARI) a(n) = {forcomposite(k=2, , if (Mod(n, k)^(k-1) == 1, return (k)); ); } \\ Michel Marcus, Mar 02 2015
CROSSREFS
Sequence in context: A265868 A239293 A295997 * A007535 A000783 A098654
KEYWORD
nonn
AUTHOR
Labos Elemer, Nov 25 2003
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 May 14 11:10 EDT 2024. Contains 372532 sequences. (Running on oeis4.)