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.

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

This page as a plain text file.
%I A324050 #35 Feb 16 2025 08:33:57
%S A324050 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 A324050 89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,
%U A324050 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 A324050 Numbers satisfying Korselt's criterion: squarefree numbers n such that for every prime divisor p of n, p-1 divides n-1.
%C A324050 Numbers n such that A002322(n) divides n-1.
%C A324050 Numbers that satisfy Korselt's criterion (see Mathworld and Wikipedia-links).
%C A324050 Union of {1}, primes and Carmichael numbers, A002997.
%C A324050 Differs from A008578 for the first time at term a(104) = 561, which (being a composite) is the first Carmichael number present.
%H A324050 David A. Corneth, <a href="/A324050/b324050.txt">Table of n, a(n) for n = 1..10000</a>
%H A324050 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/KorseltsCriterion.html">Korselt's Criterion</a>
%H A324050 Wikipedia, <a href="https://en.wikipedia.org/wiki/Carmichael_number#Korselt&#39;s_criterion">Carmichael numbers, Korselt's criterion</a>
%t A324050 okQ[n_] := SquareFreeQ[n] && AllTrue[FactorInteger[n][[All, 1]], Divisible[n-1, #-1]&];
%t A324050 {1} ~Join~ Select[Range[2, 1000], okQ] (* _Jean-François Alcover_, Oct 22 2019 *)
%o A324050 (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 A324050 for(n=1,561,if(isA324050(n), print1(n,", ")));
%o A324050 (PARI)
%o A324050 A002322(n) = lcm(znstar(n)[2]); \\ From A002322
%o A324050 isA324050(n) = (0==((n-1)%A002322(n)));
%Y A324050 Union of A008578 and A002997. Intersection of A005117 and A087441. Subsequence of A015919.
%Y A324050 Cf. A002322.
%K A324050 nonn,easy
%O A324050 1,2
%A A324050 _Antti Karttunen_, Feb 14 2019