login
A096565
Final digits of the smallest triangular number starting with n!.
2
0, 1, 6, 15, 90, 10, 3, 9003, 45300, 9570, 5840220, 533564010, 5384225220, 412190739351, 244816773411, 682660400311, 275258914747246, 710284752537711, 152042178127701610, 6144469158651504786, 8516189439015621936
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
Cf. A096564.
Sequence in context: A165570 A260117 A220360 * A013229 A013225 A138547
KEYWORD
base,nonn
AUTHOR
Jason Earls, Jun 26 2004
EXTENSIONS
Extended by Max Alekseyev, Apr 25 2009
STATUS
approved