OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..1000 from Matthew Conroy)
Dimitri Zucker, Factorial Fact Frenzy (!), Combo Class Youtube video (2022).
EXAMPLE
The sum of the decimal digits of 5! is 1+2+0=3 and 3 divides 120, so 5 is not in the sequence.
The sum of the decimal digits of 432! is 3897 = (9)(433) and 3897 does not divide 432!, so 432 is in the sequence.
MATHEMATICA
Select[Range[1000], !Divisible[Factorial[#], Total[IntegerDigits[Factorial[#]]]] &], (* Tanya Khovanova, Jun 13 2021 *)
PROG
(Python)
from math import factorial
def sd(n): return sum(map(int, str(n)))
def ok(f): return f%sd(f) != 0
print([n for n in range(1, 715) if ok(factorial(n))]) # Michael S. Branicky, Jun 13 2021
(PARI) isA066419(n) = (Mod(n!, sumdigits(n!)) != 0) \\ Jianing Song, Aug 26 2024
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Matthew Conroy, Dec 25 2001
STATUS
approved