login
Sum over the odd entries of the rows in the triangle Worpitzky(n, k)*Harmonic(k) (A176276).
2

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

%S 0,1,3,18,125,1020,9667,104790,1281177,17457840,262493231,4318429962,

%T 77178551749,1489209086820,30859393432155,683549418431934,

%U 16118484827641841,403156528379483160,10661349675027656839

%N Sum over the odd entries of the rows in the triangle Worpitzky(n, k)*Harmonic(k) (A176276).

%H G. C. Greubel, <a href="/A176277/b176277.txt">Table of n, a(n) for n = 0..420</a>

%H Peter Luschny, <a href="http://www.oeis.org/wiki/User:Peter_Luschny/SeqTransformation">A sequence transformation and the Bernoulli numbers</a>.

%F a(n) = Sum_{k=0..n} (k mod 2) abs(Stirling1(k+1, 2)*Stirling2(n+1, k+1)).

%e Let W(n, k) be the Worpitzky numbers and H(n) the harmonic numbers.

%e a(3) = W(3,1)H(1) + W(3,3)H(3) = 7*1 + 6*(11/6) = 18.

%p A176277 := proc(n) local k; add((k mod 2)*T176276(n, k), k=0..n) end;

%t a[1] = 1; a[n_]:= Sum[ StirlingS2[n+1, k+1]*k!*HarmonicNumber[k], {k,0,n,2}]; Table[a[n], {n,0,20}] (* _Jean-François Alcover_, Jul 30 2013 *)

%o (PARI) a(n) = if(n<2, n, sum(k=0,n, k!*stirling(n+1,k+1,2)*sum(j=1,k,1/j)) ); \\ _G. C. Greubel_, Nov 24 2019

%o (Magma) [n lt 2 select n else (&+[Abs(StirlingFirst(k+1, 2)*StirlingSecond(n+1, k+1)): k in [0..n]])/2: n in [0..25]];

%o (Sage)

%o def a(n):

%o if (n<2): return n

%o else: return sum( factorial(k)*stirling_number1(n+1,k+1)*harmonic_number(k) for k in (0..n))/2

%o [a(n) for n in (0..25)] # _G. C. Greubel_, Nov 24 2019

%o (GAP)

%o a:= function(n)

%o if n<2 then return n;

%o else return Sum([0..n], k-> AbsInt(Stirling1(k+1, 2) * Stirling2(n+1, k+1)))/2;

%o fi; end;

%o List([0..25], n-> a(n)); # _G. C. Greubel_, Nov 24 2019

%Y Cf. A028246, A176276.

%K easy,nonn

%O 0,3

%A _Peter Luschny_, Apr 14 2010