OFFSET
1,3
EXAMPLE
a(7) = 3 because the smallest triangular number starting with 7!=5040 is 50403 and so the last digit is 3.
PROG
(PARI) { A096565(n) = my(k, t); k=1; while(1, t=sqrtint(n!*8*10^k)+1; if(t%2==0, t++); t=(t^2-1)/8; if( t\10^k == n!, return(t%10^k)); k++ ); } \\ Max Alekseyev, Apr 25 2009
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Jason Earls, Jun 26 2004
EXTENSIONS
Extended by Max Alekseyev, Apr 25 2009
STATUS
approved