OFFSET
1,1
COMMENTS
Not a duplicate of A340058 because the complements A335902 and A340269 differ. - R. J. Mathar, Feb 16 2021
MAPLE
with(numtheory):
q:= n-> (f-> andmap(d-> irem(d-1, f)=0, divisors(n)))(min(factorset(n))-1):
select(not isprime and q, [$2..96])[]; # Alois P. Heinz, Feb 12 2021
MATHEMATICA
Select[Range[2, 96], Function[{n, s}, And[! PrimeQ@ n, AllTrue[Divisors[n] - 1, Mod[#, s] == 0 &]]] @@ {#, FactorInteger[#][[1, 1]] - 1} &] (* Michael De Vlieger, Feb 12 2021 *)
PROG
(MATLAB)
n=300; % gives all terms of the sequence not exceeding n
A=[];
for i=2:n
lpf=2;
while mod(i, lpf)~=0
lpf=lpf+1;
end
for d=1:floor(i/2)
if mod(i, d)==0 && mod(d-1, lpf-1)~=0
break
elseif d==floor(i/2)
A=[A i];
end
end
end
(PARI) isok(c) = if ((c>1) && !isprime(c), my(f=factor(c)[, 1]); for (k=1, #f~, if ((f[k]-1) % (f[1]-1), return(0))); return(1)); \\ Michel Marcus, Jan 03 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Maxim Karimov, Jan 02 2021
STATUS
approved