cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A084608 Triangle, read by rows, where the n-th row lists the (2n+1) coefficients of (1+2*x+3*x^2)^n.

This page as a plain text file.
%I A084608 #22 Mar 27 2023 03:44:24
%S A084608 1,1,2,3,1,4,10,12,9,1,6,21,44,63,54,27,1,8,36,104,214,312,324,216,81,
%T A084608 1,10,55,200,530,1052,1590,1800,1485,810,243,1,12,78,340,1095,2712,
%U A084608 5284,8136,9855,9180,6318,2916,729,1,14,105,532,2009,5922,13993,26840,41979
%N A084608 Triangle, read by rows, where the n-th row lists the (2n+1) coefficients of (1+2*x+3*x^2)^n.
%H A084608 Alois P. Heinz, <a href="/A084608/b084608.txt">Rows n = 0..100, flattened</a>
%F A084608 From _G. C. Greubel_, Mar 27 2023: (Start)
%F A084608 T(n, k) = Sum_{j=0..k} binomial(n, k-j)*binomial(k-j, j)*2^(k-2*j)*3^j.
%F A084608 T(n, n) = A084609(n).
%F A084608 T(n, 2*n-1) = A212697(n), n >= 1.
%F A084608 T(n, 2*n) = A000244(n).
%F A084608 Sum_{j=0..2*n} T(n, k) = A000400(n).
%F A084608 Sum_{k=0..2*n} (-1)^k*T(n, k) = A000079(n).
%F A084608 Sum_{k=0..n} T(n-k, k) = A101822(n). (End)
%e A084608 Triangle begins:
%e A084608   1;
%e A084608   1,  2,  3;
%e A084608   1,  4, 10,  12,   9;
%e A084608   1,  6, 21,  44,  63,   54,   27;
%e A084608   1,  8, 36, 104, 214,  312,  324,  216,   81;
%e A084608   1, 10, 55, 200, 530, 1052, 1590, 1800, 1485, 810, 243;
%p A084608 f:= proc(n) option remember; expand((1+2*x+3*x^2)^n) end:
%p A084608 T:= (n,k)-> coeff(f(n), x, k):
%p A084608 seq(seq(T(n, k), k=0..2*n), n=0..10);  # _Alois P. Heinz_, Apr 03 2011
%t A084608 row[n_] := (1+2x+3x^2)^n + O[x]^(2n+1) // CoefficientList[#, x]&; Table[row[n], {n, 0, 10}] // Flatten (* _Jean-François Alcover_, Feb 01 2017 *)
%o A084608 (PARI) for(n=0,10, for(k=0,2*n,t=polcoeff((1+2*x+3*x^2)^n,k,x); print1(t",")); print(" "))
%o A084608 (Haskell)
%o A084608 a084608 n = a084608_list !! n
%o A084608 a084608_list = concat $ iterate ([1,2,3] *) [1]
%o A084608 instance Num a => Num [a] where
%o A084608    fromInteger k = [fromInteger k]
%o A084608    (p:ps) + (q:qs) = p + q : ps + qs
%o A084608    ps + qs         = ps ++ qs
%o A084608    (p:ps) * qs'@(q:qs) = p * q : ps * qs' + [p] * qs
%o A084608    _ * _               = []
%o A084608 -- _Reinhard Zumkeller_, Apr 02 2011
%o A084608 (Magma)
%o A084608 A084608:= func< n,k | (&+[Binomial(n, k-j)*Binomial(k-j, j)*2^(k-2*j)*3^j: j in [0..k]]) >;
%o A084608 [A084608(n,k): k in [0..2*n], n in [0..13]]; // _G. C. Greubel_, Mar 27 2023
%o A084608 (SageMath)
%o A084608 def A084608(n,k): return sum(binomial(n,j)*binomial(n-j,k-2*j)*2^(k-2*j)*3^j for j in range(k//2+1))
%o A084608 flatten([[A084608(n,k) for k in range(2*n+1)] for n in range(14)]) # _G. C. Greubel_, Mar 27 2023
%Y A084608 Cf. A000079, A000244, A000400, A002426, A084600 - A084606, A006139, A084609 - A084615, A101822, A212697.
%K A084608 nonn,tabf
%O A084608 0,3
%A A084608 _Paul D. Hanna_, Jun 01 2003