login
a(n) = Sum_{i=0..n-1} Sum_{j=0..i} (i-j+1)^j.
5

%I #29 Oct 04 2024 11:23:31

%S 0,1,3,7,16,39,105,315,1048,3829,15207,65071,297840,1449755,7468541,

%T 40555747,231335960,1381989881,8623700811,56078446615,379233142800,

%U 2662013133295,19362917622001,145719550012299,1133023004941272,9090156910550109,75161929739797519

%N a(n) = Sum_{i=0..n-1} Sum_{j=0..i} (i-j+1)^j.

%C Partial sums of A026898.

%C Antidiagonal sums of array A103438.

%C Row sums of A123490. - _Paul Barry_, Oct 01 2006

%H Alois P. Heinz, <a href="/A103439/b103439.txt">Table of n, a(n) for n = 0..600</a>

%H Carlos M. da Fonseca and Anthony G. Shannon, <a href="https://doi.org/10.7546/nntdm.2024.30.3.491-498">A formal operator involving Fermatian numbers</a>, Notes Num. Theor. Disc. Math. (2024) Vol. 30, No. 3, 491-498.

%F a(n+1) = Sum_{k=0..n} ((k+2)^(n-k) + k)/(k+1). - _Paul Barry_, Oct 01 2006

%F G.f.: (G(0)-1)/(1-x) where G(k) = 1 + x*(2*k*x-1)/(2*k*x+x-1 - x*(2*k*x+x-1)^2/(x*(2*k*x+x-1) + (2*k*x+2*x-1)/G(k+1) )); (recursively defined continued fraction). - _Sergei N. Gladkovskii_, Jan 26 2013

%p b:= proc(i) option remember; add((i-j+1)^j, j=0..i) end:

%p a:= proc(n) option remember; add(b(i), i=0..n-1) end:

%p seq(a(n), n=0..30); # _Alois P. Heinz_, Dec 02 2019

%t Join[{0},Table[Sum[Sum[(i-j+1)^j,{j,0,i}],{i,0,n}],{n,0,30}]] (* _Harvey P. Dale_, Dec 03 2018 *)

%o (Magma) [0] cat [(&+[ (&+[ (k-j+1)^j : j in [0..k]]) : k in [0..n-1]]): n in [1..30]]; // _G. C. Greubel_, Jun 15 2021

%o (Sage) [sum(sum((k-j+1)^j for j in (0..k)) for k in (0..n-1)) for n in (0..30)] # _G. C. Greubel_, Jun 15 2021

%o (PARI) a(n) = sum(i=0, n-1, sum(j=0, i, (i-j+1)^j)); \\ _Michel Marcus_, Jun 15 2021

%Y Cf. A026898, A103438, A123490.

%K nonn

%O 0,3

%A _Ralf Stephan_, Feb 11 2005

%E Name edited by _Alois P. Heinz_, Dec 02 2019