OFFSET
1,1
COMMENTS
Weak Carmichael numbers that are not prime powers [Mestrovic] - N. J. A. Sloane, Aug 25 2013
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
Romeo Meštrović, Generalizations of Carmichael numbers I, arXiv:1305.1867v1 [math.NT], May 4, 2013.
EXAMPLE
45 is in A087442 because it is not a prime power and because its prime divisors are 3 and 5 and 3-1=2 as well as 5-1=4 divide 45-1 = 44.
MATHEMATICA
wcQ[n_] := Length[(p = FactorInteger[n][[;; , 1]])] > 1 && AllTrue[p, Divisible[n-1, #-1] &]; Select[Range[10^4], wcQ] (* Amiram Eldar, Sep 22 2019 *)
PROG
(GAP) for i in [2..20000] do if IsSubset (DivisorsInt(i-1), Set (FactorsInt (i)) - 1) and not IsPrimePowerInt (i) then Print (i, ", "); fi; od;
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jens Voß, Sep 04 2003
STATUS
approved