login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A297438 A divisor analog of the Motzkin numbers A001006. 0

%I #8 Oct 27 2019 12:01:14

%S 1,1,2,3,7,12,29,56,134,283,672,1496,3568,8214,19678,46364,111766,

%T 267467,648941,1570540,3833777,9357181,22967808,56430230,139193762,

%U 343825265,851777363,2113382992,5255584309,13089273904

%N A divisor analog of the Motzkin numbers A001006.

%C By changing the upper summation index in the recurrence from k-1 to n-1 we get the Motzkin numbers A001006.

%C That is, by changing

%C Sum_{i=1..k-1} t(n-i, k-1) - Sum_{i=1..k-1} t(n-i, k)

%C into

%C Sum_{i=1..n-1} t(n-i, k-1) - Sum_{i=1..n-1} t(n-i, k),

%C we get the Motzkin numbers.

%C With this change of upper summation index, a(n) is to A001006 as A239605 is to A000108.

%t Clear[t, n, k, i, nn, x];

%t coeff = {1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

%t 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};

%t mp[m_, e_] :=

%t If[e == 0, IdentityMatrix@Length@m, MatrixPower[m, e]]; nn =

%t Length[coeff]; cc = Range[nn]*0 + 1; Monitor[

%t Do[Clear[t]; t[n_, 1] := t[n, 1] = cc[[n]];

%t t[n_, k_] :=

%t t[n, k] =

%t If[n >= k,

%t Sum[t[n - i, k - 1], {i, 1, k - 1}] -

%t Sum[t[n - i, k], {i, 1, k - 1}], 0];

%t A4 = Table[Table[t[n, k], {k, 1, nn}], {n, 1, nn}];

%t A5 = A4[[1 ;; nn - 1]]; A5 = Prepend[A5, ConstantArray[0, nn]];

%t cc = Total[

%t Table[coeff[[n]]*mp[A5, n - 1][[All, 1]], {n, 1, nn}]];, {i, 1,

%t nn}], i]; cc

%Y Cf. A001006, A239605.

%K nonn

%O 1,3

%A _Mats Granvik_, Dec 30 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 13 22:54 EDT 2024. Contains 375146 sequences. (Running on oeis4.)