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”).

Row sums of A339033.
2

%I #16 Feb 01 2024 01:55:15

%S 1,1,4,11,35,147,805,5399,42273,375787,3728261,40788255,487539769,

%T 6319430483,88272658797,1321745733511,21117967813025,358591883025339,

%U 6448525343069653,122424951294889967,2446864618294774281,51354975368171586595,1129258990476358286909

%N Row sums of A339033.

%H Paolo Xausa, <a href="/A339034/b339034.txt">Table of n, a(n) for n = 0..440</a>

%F a(n) = n! - (n - 1)! + Sum_{k=1..n} (n + 1 - k)*(k - 1)! for n > 0.

%t A339034[n_] := If[n == 0, 1, n! + Sum[(n+1-k)*(k-1)!, {k, n-1}]];

%t Array[A339034, 25, 0] (* _Paolo Xausa_, Jan 31 2024 *)

%o (SageMath)

%o def A339034(n):

%o if n == 0: return 1

%o d = factorial(n) - factorial(n - 1)

%o return add((n + 1 - k)*factorial(k - 1) for k in (1..n)) + d

%o print([A339034(n) for n in (0..22)])

%o (PARI) a(n) = if (n==0, 1, n! - (n-1)! + sum(k=1, n, (n+1-k)*(k-1)!)); \\ _Michel Marcus_, Dec 02 2020

%Y Cf. A339033.

%K nonn

%O 0,3

%A _Peter Luschny_, Nov 20 2020