cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A344496 a(0)=0; for n > 0, a(n) = a(n-1)*n + n if n is odd, (a(n-1) + n)*n otherwise.

This page as a plain text file.
%I A344496 #23 Jun 07 2021 04:48:05
%S A344496 0,1,6,21,100,505,3066,21469,171816,1546353,15463630,170099941,
%T A344496 2041199436,26535592681,371498297730,5572474465965,89159591455696,
%U A344496 1515713054746849,27282834985443606,518373864723428533,10367477294468571060,217717023183839992281,4789774510044479830666
%N A344496 a(0)=0; for n > 0, a(n) = a(n-1)*n + n if n is odd, (a(n-1) + n)*n otherwise.
%F A344496 a(n) ~ n! * (3*exp(1)/2 + exp(-1)/2). - _Vaclav Kotesovec_, Jun 05 2021
%e A344496 a(0) = 0;
%e A344496 a(1) =  a(0)*1 + 1 =   0 + 1    =   1;
%e A344496 a(2) = (a(1)+2)* 2 =  (1 + 2)*2 =   6;
%e A344496 a(3) =  a(2)*3 + 3 = 6*3 + 3    =  21;
%e A344496 a(4) = (a(3)+4)* 4 = (21 + 4)*4 = 100.
%p A344496 a:= proc(n) a(n):= n*a(n-1) + n^(2-(n mod 2)) end: a(0):= 0:
%p A344496 seq(a(n), n=0..22);  # _Alois P. Heinz_, May 21 2021
%t A344496 a[0] = 0; a[n_] := a[n] = n * (a[n - 1] + If[OddQ[n], 1, n]); Array[a, 30, 0] (* _Amiram Eldar_, May 21 2021 *)
%t A344496 Table[n*(-1 + 3*E*Gamma[n,1] + (n-1)*Subfactorial[n-2])/2, {n, 0, 30}] (* _Vaclav Kotesovec_, Jun 05 2021 *)
%Y A344496 Cf. A344262, A344495.
%K A344496 nonn
%O A344496 0,3
%A A344496 _Amrit Awasthi_, May 21 2021