login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(2n) = n, a(2n+1) = n!.
0

%I #11 Sep 08 2022 08:45:24

%S 0,1,1,1,2,2,3,6,4,24,5,120,6,720,7,5040,8,40320,9,362880,10,3628800,

%T 11,39916800,12,479001600,13,6227020800,14,87178291200,15,

%U 1307674368000,16,20922789888000,17,355687428096000,18,6402373705728000,19,121645100408832000

%N a(2n) = n, a(2n+1) = n!.

%t Flatten[Table[{n, n!}, {n, 0, 20}]] (* _Vincenzo Librandi_, Mar 05 2015 *)

%t With[{nn=20},Riffle[Range[0,nn],Range[0,nn]!]] (* _Harvey P. Dale_, Jan 09 2016 *)

%o (Magma) &cat[[n, Factorial(n)]: n in [0..20]]; // _Vincenzo Librandi_, Mar 05 2015

%Y Cf. A051340.

%K nonn

%O 0,5

%A _Parthasarathy Nambi_, Mar 15 2006

%E More terms from _Franklin T. Adams-Watters_, Jun 02 2006