|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|