%I #10 Sep 03 2016 17:05:45
%S 0,1,1,1,3,2,6,6,10,24,15,120,21,720,28,5040,36,40320,45,362880,55,
%T 3628800,66,39916800,78,479001600,91,6227020800,105,87178291200,120,
%U 1307674368000,136,20922789888000,153,355687428096000,171
%N a(2n) = n*(n+1)/2, a(2n+1) = n!.
%C a(n) = n + a(n-1), a(n) = n*(n+1)/2, with a(0) = 0 and b(n) = n*a(n-1), a(n) = n!, with b(0) = 1, then you can form a function F such that: F(n!) = n*(n+1)/2.
%H G. C. Greubel, <a href="/A154028/b154028.txt">Table of n, a(n) for n = 0..900</a>
%t Flatten[Table[{n*(n + 1)/2, n!}, {n, 0, 20}]] (* Produces terms *)
%t (*addition*)
%t a[0] = 0; a[n_] := a[n] = n + a[n - 1];
%t Table[a[n] - n*(n + 1)/2, {n, 0, 20}] (* Demonstrates that a[n] = n*(n+1)/2 *)
%t (*multiplication*)
%t b[0] = 1; b[n_] := b[n] = n*b[n - 1];
%t Table[b[n] - n!, {n, 0, 20}] (* Demonstrates that b[n] = n! *)
%o (PARI) a(n)=if(n%2,(n\2)!,n*(n+2)/8) \\ _Charles R Greathouse IV_, Sep 01 2016
%K nonn,easy
%O 0,5
%A _Roger L. Bagula_, Jan 04 2009