OFFSET
1,2
LINKS
Michel Marcus, Table of n, a(n) for n = 1..90
EXAMPLE
11!=11*10*9*8*7*6*5*4*3*2*1=39916800 -> (3+9+9+1+6+8+0+0)=36,
11!!=11*9*7*5*3*1=10395 -> (1+0+3+9+5)=18,
36/18=2.
MAPLE
P:=proc(n) local i, j, k, w, x; for i from 1 by 1 to n do w:=0; k:=i!; while k>0 do w:=w+k-(trunc(k/10)*10); k:=trunc(k/10); od; x:=i; j:=i-2; while j >0 do x:=x*j; j:=j-2; od: k:=x; x:=0; while k>0 do x:=x+k-(trunc(k/10)*10); k:=trunc(k/10); od; if trunc(w/x)=w/x then print(i); fi; od; end: P(1000);
MATHEMATICA
Select[Range[1000], Divisible[Total[IntegerDigits[#!, 10]], Total[IntegerDigits[#!!, 10]]] &] (* G. C. Greubel, Sep 30 2016 *)
PROG
(PARI) df(n) = prod(i=0, (n-1)\2, n - 2*i ); \\ A006882
isok(m) = !(sumdigits(m!) % sumdigits(df(m))); \\ Michel Marcus, Jun 18 2024
CROSSREFS
KEYWORD
hard,nonn,base
AUTHOR
Paolo P. Lava, Nov 30 2007
EXTENSIONS
Changed offset to 1 by Paolo P. Lava, Jun 17 2024
STATUS
approved