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 A239293 #27 Aug 06 2018 03:07:07 %S A239293 4,341,6,6,10,10,14,9,12,15,15,22,21,15,21,20,34,25,38,21,28,33,33,25, %T A239293 28,27,39,36,35,49,49,33,44,35,45,42,45,39,57,52,82,66,77,45,55,69,65, %U A239293 49,56,51,65,65,65,55,63,57,65,66,87,65,91,63,93,65,70,78,85 %N A239293 Smallest composite c > n such that n^c == n (mod c). %C A239293 a(n) is the smallest weak pseudoprime to base n that is > n. %C A239293 If n is even and n+1 is composite, then a(n) = n+1. [Corrected by _Thomas Ordowski_, Aug 03 2018] %C A239293 Conjecture: a(n) = n+1 if and only if n+1 is an odd composite number. - _Thomas Ordowski_, Aug 03 2018 %H A239293 T. D. Noe, <a href="/A239293/b239293.txt">Table of n, a(n) for n = 1..10000</a> %H A239293 Gérard P. Michon, <a href="http://www.numericana.com/answer/pseudo.htm#weak">Weak pseudoprimes to base a</a> %p A239293 L:=NULL: for a to 100 do for n from a+1 while isprime(n) or not(a^n - a mod n =0) do od; L:=L,n od: L; %t A239293 Table[k = n; While[k++; PrimeQ[k] || PowerMod[n, k, k] != n]; k, {n, 100}] (* _T. D. Noe_, Mar 17 2014 *) %o A239293 (Haskell) %o A239293 import Math.NumberTheory.Moduli (powerMod) %o A239293 a239293 n = head [c | c <- a002808_list, powerMod n c c == n] %o A239293 -- _Reinhard Zumkeller_, Jul 11 2014 %o A239293 (PARI) a(n) = forcomposite(c=n+1, , if(Mod(n, c)^c==n, return(c))) \\ _Felix Fröhlich_, Aug 03 2018 %Y A239293 Cf. A000790 (primary pretenders), A007535 (smallest pseudoprimes to base n). %Y A239293 Cf. A002808. %K A239293 nonn %O A239293 1,1 %A A239293 _Robert FERREOL_, Mar 14 2014