This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A090086 #176 Mar 27 2025 20:55:15 %S A090086 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 A090086 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 A090086 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 A090086 Smallest pseudoprime to base n, not necessarily exceeding n (cf. A007535). %C A090086 If n-1 is composite, then a(n) < n. - _Thomas Ordowski_, Aug 08 2018 %C A090086 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 A090086 It seems that if a(2^p) = p^2, then 2^p-1 is prime. - _Thomas Ordowski_, Aug 10 2018 %C A090086 a(n) is the smallest composite k such that n^(k-1) == (1-k)^n (mod k). - _Thomas Ordowski_, Mar 19 2025 %H A090086 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 A090086 Wikipedia, <a href="http://en.wikipedia.org/wiki/Pseudoprime">Pseudoprime</a> %H A090086 <a href="/index/Ps#pseudoprimes">Index entries for sequences related to pseudoprimes</a> %F A090086 a(n) = LeastComposite{x; n^(x-1) mod x = 1}. %e A090086 From _Robert G. Wilson v_, Feb 26 2015: (Start) %e A090086 a(n) = 4 for n = 1 + 4*k, k >= 0. %e A090086 a(n) = 6 for n = 7 + 12*k, k >= 0. %e A090086 a(n) = 9 for n = 8 + 18*k, 10 + 18*k, 35 + 36*k, k >= 0. %e A090086 (End) %e A090086 a(n) = 10 for n = 51 + 60*k, 11 + 180*k, 131 + 180*k, k >= 0. %t A090086 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 A090086 (PARI) /* a(n) <= 2000 is sufficient up to n = 10000 */ %o A090086 a(n) = for(k=2,2000,if((n^(k-1))%k==1 && !isprime(k), return(k))) \\ _Eric Chen_, Feb 22 2015 %o A090086 (PARI) a(n) = {forcomposite(k=2, , if (Mod(n,k)^(k-1) == 1, return (k)););} \\ _Michel Marcus_, Mar 02 2015 %Y A090086 Cf. A007535, A250200, A090085, A090087, A000790, A239293, A293203. %Y A090086 Cf. A001567, A005935, A005936, A005937, A005938, A005939, A020136 - A020228. %K A090086 nonn %O A090086 1,1 %A A090086 _Labos Elemer_, Nov 25 2003