%I #19 Feb 15 2020 10:42:02
%S 6,561,1595,35,1705,77,13481,187,143,209,4807,221,14807,493,20723,323,
%T 7429,437,36593,943,713,989,1147,1073,899,1537,1271,899,1333,1517,
%U 104355281,1591,1517,2993,1591,1517,621193,3397,1763,1763,2623,2021
%N For n>0, a(n) is the least quasi-Carmichael number to base n; a(0) = least composite squarefree integer.
%C a(n) is the least squarefree composite integer for which prime p | a(n) ==> p-n | a(n)-n.
%H Donovan Johnson, <a href="/A029590/b029590.txt">Table of n, a(n) for n = 0..500</a>
%H <a href="/index/Ca#Carmichael">Index entries for sequences related to Carmichael numbers.</a>
%e For n=6 the minimum is a(n)=13481. Prime factors of 13481 are 13, 17 and 61. We have 13481 - 6 = 13475, 13 - 6 = 7 and 13475 / 7 = 1925, 17 - 6 = 11 and 13475 / 11 = 1225, 61 - 6 = 55 and 13475 / 55 = 245. - _Elijah Beregovsky_, Feb 15 2020
%t qcQ[n_,k_] := Module[{f = FactorInteger[n]}, p = f[[;; , 1]]; e = f[[;; , 2]];om=Length[e]; om>=2 && Max[e] == 1 && Min[p]>k && Length@Select[p, Divisible[n-k, #-k]&] == om]; seq[k_]:=SelectFirst[Range[1,50000], qcQ[#,k]&]; Print[seq/@Range[0,29]]; (* _Elijah Beregovsky_, Feb 15 2020 *)
%Y Cf. A029591 (base -n), A257750 (quasi-Carmichael numbers).
%K nonn
%O 0,1
%A _David W. Wilson_