cp's OEIS Frontend

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.

A323214 Composite numbers k such that p^(k-1) == 1 (mod k) for every prime p strongly prime to k.

This page as a plain text file.
%I A323214 #30 Feb 10 2021 01:09:34
%S A323214 4,6,561,1105,1729,2465,2821,6601,8911,10585,15841,29341,41041,46657,
%T A323214 52633,62745,63973,75361,101101,115921,126217,162401,172081,188461,
%U A323214 252601,278545,294409,314821,334153,340561,399001,410041,449065,488881,512461,530881,552721
%N A323214 Composite numbers k such that p^(k-1) == 1 (mod k) for every prime p strongly prime to k.
%C A323214 A positive number k <= n is strongly prime to n if and only if k is prime to n and k does not divide n-1. See A322937 and the link to 'Strong Coprimality'.
%C A323214 Apparently essentially the Carmichael numbers A002997.
%H A323214 K. Bouallègue, O. Echi and R. G. E. Pinch, <a href="http://dx.doi.org/10.1142/S1793042110002922">Korselt numbers and sets</a>, International Journal of Number Theory, 6 (2010), 257-269.
%H A323214 A. Korselt, G. Tarry, I. Franel and G. Vacca, <a href="http://oeis.org/wiki/File:Probl%C3%A8me_chinois.pdf">Problème chinois</a>, L'intermédiaire des mathématiciens 6 (1899), 142-144.
%H A323214 Peter Luschny, <a href="http://oeis.org/wiki/User:Peter_Luschny/StrongCoprimality">Strong Coprimality</a>
%H A323214 C. Pomerance, J. L. Selfridge, and S. S. Wagstaff, Jr., <a href="http://dx.doi.org/10.1090/S0025-5718-1980-0572872-7">The pseudoprimes to 25*10^9</a>, Math. Comp., 35 (1980), 1003-1026.
%H A323214 V. Šimerka, <a href="https://dml.cz/handle/10338.dmlcz/122245">Zbytky z arithmetické posloupnosti</a>, (On the remainders of an arithmetic progression), Časopis pro pěstování matematiky a fysiky. 14  (1885), 221-225.
%H A323214 L. Wang, <a href="http://dx.doi.org/10.1142/S1793042118500148">The Korselt set of a power of a prime</a>, International Journal of Number Theory, 14 (2018), 233-240.
%e A323214 2, 3 and 5 are not in this sequence because primes are not in this sequence.
%e A323214 4 and 6 are in this sequence because there are no primes strongly prime to 4 respectively 6.
%e A323214 For n = 1729 there are 1296 test cases using the definition of A002997 but only 264 test cases using the definition of a(n).
%o A323214 (Sage)
%o A323214 def is_strongCarmichael(n):
%o A323214     if n == 1 or is_prime(n): return False
%o A323214     for k in (1..n):
%o A323214         if is_prime(k) and not k.divides(n-1) and is_primeto(k, n):
%o A323214             if power_mod(k, n-1, n) != 1: return false
%o A323214     return true
%o A323214 def A323214_list(len):
%o A323214     return [n for n in (1..len) if is_strongCarmichael(n)]
%o A323214 print(A323214_list(600000))
%o A323214 (Julia)
%o A323214 using IntegerSequences
%o A323214 PrimesPrimeTo(n) = (p for p in Primes(n) if isPrimeTo(p, n))
%o A323214 function isStrongCarmichael(n)
%o A323214     if isComposite(n)
%o A323214         for k in PrimesPrimeTo(n)
%o A323214             if ! Divides(k, n-1)
%o A323214                 if powermod(k, n-1, n) != 1
%o A323214                     return false
%o A323214                 end
%o A323214             end
%o A323214         end
%o A323214         return true
%o A323214     end
%o A323214     return false
%o A323214 end
%o A323214 L323214(len) = [n for n in 1:len if isStrongCarmichael(n)]
%o A323214 L323214(30000) |> println
%Y A323214 Cf. A002997, A322937.
%K A323214 nonn
%O A323214 1,1
%A A323214 _Peter Luschny_, Apr 01 2019