Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Numbers satisfying Korselt's criterion: squarefree numbers n such that for every prime divisor p of n, p-1 divides n-1.
9

%I #34 Oct 22 2019 16:42:06

%S 1,2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,

%T 89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,

%U 179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359

%N Numbers satisfying Korselt's criterion: squarefree numbers n such that for every prime divisor p of n, p-1 divides n-1.

%C Numbers n such that A002322(n) divides n-1.

%C Numbers that satisfy Korselt's criterion (see Mathworld and Wikipedia-links).

%C Union of {1}, primes and Carmichael numbers, A002997.

%C Differs from A008578 for the first time at term a(104) = 561, which (being a composite) is the first Carmichael number present.

%H David A. Corneth, <a href="/A324050/b324050.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/KorseltsCriterion.html">Korselt's Criterion</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Carmichael_number#Korselt&#39;s_criterion">Carmichael numbers, Korselt's criterion</a>

%t okQ[n_] := SquareFreeQ[n] && AllTrue[FactorInteger[n][[All, 1]], Divisible[n-1, #-1]&];

%t {1} ~Join~ Select[Range[2, 1000], okQ] (* _Jean-François Alcover_, Oct 22 2019 *)

%o (PARI) isA324050(n) = if(1==n,1, my(f=factor(n)); for(i=1, #f[, 1], if(f[i, 2]>1||(n-1)%(f[i, 1]-1), return(0))); (1)); \\ After program Korselt in A002997

%o for(n=1,561,if(isA324050(n), print1(n,", ")));

%o (PARI)

%o A002322(n) = lcm(znstar(n)[2]); \\ From A002322

%o isA324050(n) = (0==((n-1)%A002322(n)));

%Y Union of A008578 and A002997. Intersection of A005117 and A087441. Subsequence of A015919.

%Y Cf. A002322.

%K nonn,easy

%O 1,2

%A _Antti Karttunen_, Feb 14 2019