OFFSET
1,2
COMMENTS
Positive integers that divide some positive element of A003422.
From Robert Israel, Nov 14 2016: (Start)
Numbers n such that A013584(n) > 0.
If n is in the sequence, then so are all divisors of n. (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
filter:= proc(n) local t, r, m;
r:= 1; t:= 1;
for m from 1 do
r:= r*m mod n;
if r = 0 then return false fi;
t:= t + r mod n;
if t = 0 then return true fi;
od;
end proc:
filter(1):= true:
select(filter, [$1..1000]); # Robert Israel, Nov 14 2016
MATHEMATICA
okQ[n_] := Module[{t, r, m}, r = 1; t = 1; For[m = 1, True, m++, r = Mod[r*m, n]; If[r == 0, Return[False]]; t = Mod[t + r, n]; If[t == 0, Return[True]]]];
okQ[1] = True;
Select[Range[1000], okQ] (* Jean-François Alcover, Apr 10 2019, after Robert Israel *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved