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

A027215
Self-convolution of row n of array T given by A026736.
1
1, 2, 6, 20, 78, 282, 1187, 4428, 19175, 72820, 319493, 1227712, 5424359, 21018514, 93252862, 363563668, 1617342486, 6334904252, 28232695584, 110982722888, 495257577162
OFFSET
0,2
LINKS
MATHEMATICA
T[n_, k_]:= T[n, k] = If[k==0 || k==n, 1, If[EvenQ[n] && k==(n-2)/2, T[n-1, k-1] + T[n-2, k-1] + T[n-1, k], T[n-1, k-1] + T[n-1, k]]];
Table[Sum[T[n, k]*T[n, n-k], {k, 0, n}], {n, 0, 40}] (* G. C. Greubel, Jul 19 2019 *)
PROG
(PARI) T(n, k) = if(k==n || k==0, 1, k==n-1, n, if((n%2)==0 && k==(n-2)/2, T(n-1, k-1) + T(n-2, k-1) + T(n-1, k), T(n-1, k-1) + T(n-1, k) ));
vector(21, n, n--; sum(k=0, n, T(n, k)*T(n, n-k)) ) \\ G. C. Greubel, Jul 19 2019
(Sage)
@CachedFunction
def T(n, k):
if (k==0 or k==n): return 1
if (k==n-1): return n
elif (mod(n, 2)==0 and k==(n-2)/2): return T(n-1, k-1) + T(n-2, k-1) + T(n-1, k)
else: return T(n-1, k-1) + T(n-1, k)
[sum(T(n, k)*T(n, n-k) for k in (0..n)) for n in (0..40)] # G. C. Greubel, Jul 19 2019
(GAP)
T:= function(n, k)
if k=0 or k=n then return 1;
elif k=n-1 then return n;
elif (n mod 2)=0 and k=Int((n-2)/2) then return T(n-1, k-1) + T(n-2, k-1) + T(n-1, k);
else return T(n-1, k-1) + T(n-1, k);
fi;
end;
List([0..20], n-> Sum([0..n], k-> T(n, k)*T(n, n-k) )); # G. C. Greubel, Jul 19 2019
CROSSREFS
Cf. A026736.
Sequence in context: A148484 A148485 A287424 * A150177 A150178 A150179
KEYWORD
nonn
STATUS
approved