login
Sum of all n-digit terms of A005043.
0

%I #17 Nov 30 2019 06:10:44

%S 12,142,835,5798,124932,853467,6536382,50852019,1234849644,9043402501,

%T 73007772802,593742784829,4859761676391,125320157443726,

%U 953467954114363,7939655757745265,66368199913921497,556704809728838604,4684478925507420069,125076091920076709793

%N Sum of all n-digit terms of A005043.

%e Sum of all 1-digit Riordan numbers is 1 + 0 + 1 + 1 + 3 + 6 = 12.

%e Sum of all 2-digit Riordan numbers is 15 + 36 + 91 = 142.

%e Sum of all 3-digit Riordan numbers is 232 + 603 = 835.

%t digNum[n_] := Length @ IntegerDigits[n];rio[0] = 1; rio[1] = 0; rio[n_] := rio[n] = (n - 1)*(2*rio[n - 1] + 3*rio[n - 2])/(n + 1); digCount = 0; sum = 0; cumsum = {}; Do[r = rio[n]; If[digNum[r] > digCount, digCount++; AppendTo[cumsum, sum]]; sum += r, {n, 0, 50}]; Differences[cumsum] (* _Amiram Eldar_, Nov 30 2019 *)

%Y Cf. A005043.

%K nonn,base,less

%O 1,1

%A _Parthasarathy Nambi_, Dec 06 2007

%E More terms from _Amiram Eldar_, Nov 30 2019