OFFSET
1,2
COMMENTS
This sequence is infinite as it contains all factorial numbers (A000142).
EXAMPLE
8 == 1 mod 1! and 1 divides 1!, 8 == 2 mod 2! and 2 divides 2!, 8 == 2 mod 3! and 2 divides 3!, 8 divides k! for any k > 3, hence 8 appears in the sequence.
42 == 18 mod 4! and 18 is not a divisor of 4!, hence 42 does not appear in the sequence.
PROG
(PARI) is(n) = my (f=1); for (k=1, oo, f*=k; if (f%n==0, return (1), (n%f) && (f%(n%f)), return (0)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Apr 29 2018
STATUS
approved