A141016 Duplicate of A008998.
0, 1, 2, 4, 9, 20, 44, 97, 214, 472, 1041, 2296, 5064, 11169, 24634, 54332
Offset: 0
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.
Triangle begins: 1; 1, 2; 1, 4, 4; 1, 6, 12, 8; 1, 8, 24, 32, 16; 1, 10, 40, 80, 80, 32; 1, 12, 60, 160, 240, 192, 64; 1, 14, 84, 280, 560, 672, 448, 128; 1, 16, 112, 448, 1120, 1792, 1792, 1024, 256; 1, 18, 144, 672, 2016, 4032, 5376, 4608, 2304, 512; 1, 20, 180, 960, 3360, 8064, 13440, 15360, 11520, 5120, 1024; 1, 22, 220, 1320, 5280, 14784, 29568, 42240, 42240, 28160, 11264, 2048; 1, 24, 264, 1760, 7920, 25344, 59136, 101376, 126720, 112640, 67584, 24576, 4096; From _Peter Bala_, Apr 20 2012: (Start) The triangle can be written as the matrix product A038207*(signed version of A013609). |.1................||.1..................| |.2...1............||-1...2..............| |.4...4...1........||.1..-4...4..........| |.8..12...6...1....||-1...6...-12...8....| |16..32..24...8...1||.1..-8....24.-32..16| |..................||....................| (End)
a013609 n = a013609_list !! n a013609_list = concat $ iterate ([1,2] *) [1] instance Num a => Num [a] where fromInteger k = [fromInteger k] (p:ps) + (q:qs) = p + q : ps + qs ps + qs = ps ++ qs (p:ps) * qs'@(q:qs) = p * q : ps * qs' + [p] * qs * = [] -- Reinhard Zumkeller, Apr 02 2011
a013609 n k = a013609_tabl !! n !! k a013609_row n = a013609_tabl !! n a013609_tabl = iterate (\row -> zipWith (+) ([0] ++ row) $ zipWith (+) ([0] ++ row) (row ++ [0])) [1] -- Reinhard Zumkeller, Jul 22 2013, Feb 27 2013
[2^k*Binomial(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Sep 17 2021
bin2:=proc(n,k) option remember; if k<0 or k>n then 0 elif k=0 then 1 else 2*bin2(n-1,k-1)+bin2(n-1,k); fi; end; # N. J. A. Sloane, Jun 01 2009
Flatten[Table[CoefficientList[(1 + 2*x)^n, x], {n, 0, 10}]][[1 ;; 59]] (* Jean-François Alcover, May 17 2011 *) BinomialROW[n_, k_, t_] := Sum[Binomial[n, k]*Binomial[k, j]*(-1)^(k - j)*t^j, {j, 0, k}]; Column[Table[BinomialROW[n, k, 3], {n, 0, 10}, {k, 0, n}], Center] (* Kolosov Petro, Jan 28 2019 *)
a(n,k):=coeff(expand((1+2*x)^n),x^k); create_list(a(n,k),n,0,6,k,0,n); /* Emanuele Munarini, Nov 21 2012 */
/* same as in A092566 but use */ steps=[[1,0], [1,1], [1,1]]; /* note double [1,1] */ /* Joerg Arndt, Jul 01 2011 */
flatten([[2^k*binomial(n,k) for k in (0..n)] for n in (0..15)]) # G. C. Greubel, Sep 17 2021
I:=[1,1,2]; [n le 3 select I[n] else 2*Self(n-1)+Self(n-3): n in [1..40]];
R:=PowerSeriesRing(Integers(), 32); Coefficients(R!( (1 - x)/(1 - 2*x - x^3))); // Marius A. Burtea, Feb 14 2020
spec := [S,{S=Sequence(Prod(Union(Prod(Z,Z,Z),Z),Sequence(Z)))},unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20);
CoefficientList[Series[(1 - x)/(1 - 2 x - x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Feb 05 2014 *)
Vec((1-x)/(1-2*x-x^3)+O(x^99)) \\ Charles R Greathouse IV, Nov 20 2011
a:=[1,2,4,8];; for n in [5..40] do a[n]:=2*a[n-1]+a[n-4]; od; a; # G. C. Greubel, Jun 12 2019
I:=[1, 2, 4, 8]; [n le 4 select I[n] else 2*Self(n-1)+Self(n-4): n in [1..40]]; // Vincenzo Librandi, May 09 2012
A008999 := proc(n) option remember; if n <= 3 then 2^n else 2*A008999(n-1)+A008999(n-4); fi; end;
LinearRecurrence[{2,0,0,1},{1,2,4,8},40] (* Harvey P. Dale, May 09 2012 *) CoefficientList[Series[1/(1-2x-x^4),{x,0,40}],x] (* Vincenzo Librandi, May 09 2012 *)
a(n):=sum(sum(binomial(n-m+(-3)*j,j)*binomial(n-3*j,m),j,0,(n-m)/3),m,0,n); /* Vladimir Kruchinin, May 23 2011 */
my(x='x+O('x^40)); Vec(1/(1-2*x-x^4)) \\ G. C. Greubel, Jun 12 2019
(1/(1-2*x-x^4)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 12 2019
Some solutions for n=6: 1 1 1 0 0 1 -1 1 0 -1 -1 0 0 0 -1 -1 -1 -1 -1 0 -1 -1 1 -1 1 1 1 1 1 0 1 1 -1 0 1 0 1 1 0 0 -1 -1 0 -1 -1 1 -1 1 1 1 1 0 1 0 -1 -1 1 1 0 0 -1 -1 -1 -1 0 -1 -1 -1 -1 0 1 1 -1 0 0 0 1 1 1 1 0 1 1 1 1 0 -1 0 0 0 0 0 0 -1 -1 -1
a193641 n = a193641_list !! n a193641_list = drop 2 xs where xs = 1 : 1 : 1 : zipWith (+) xs (map (* 2) $ drop 2 xs) -- Reinhard Zumkeller, Jan 01 2014
a:= n-> (<<0|1|0|0>, <0|0|1|0>, <0|0|0|1>, <-1|1|-2|3>>^n)[4,4]: seq(a(n), n=0..30); # Alois P. Heinz, Nov 12 2017
CoefficientList[Series[(1-x)^(-1)/(1-2x-x^3),{x,0,40}],x] (* or *) LinearRecurrence[{3,-2,1,-1},{1,3,7,16},40] (* Harvey P. Dale, Oct 05 2012 *)
Triangle begins as: 0; 0, 0; 1, 1, 1; 1, 2, 3, 4; 1, 4, 9, 16, 25; 2, 9, 28, 65, 126, 217; 3, 20, 87, 264, 635, 1308, 2415; 4, 44, 270, 1072, 3200, 7884, 16954, 32960;
m:=12; R:=PowerSeriesRing(Integers(), m+2); A117716:= func< n,k | Coefficient(R!( x^2/(1-(k+1)*x-x^3) ), n) >; [[A117716(n,k): k in [0..n]]: n in [0..m]]; // G. C. Greubel, Jul 23 2023
A117716 := proc(n,m) x^2/(1-(m+1)*x-x^3) ; if n < 0 then 0; else coeftayl(%,x=0,n) ; end if; end proc: # R. J. Mathar, May 14 2013
T[n_, k_]:= T[n, k]= Coefficient[Series[x^2/(1-(k+1)*x-x^3), {x,0,n+ 2}], x, n]; Table[T[n,k], {n,0,12}, {k,0,n}]//Flatten
def A117716(n,k): P.= PowerSeriesRing(QQ) return P( x^2/(1-(k+1)*x-x^3) ).list()[n] flatten([[A117716(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Jul 23 2023
a:=[2,4,8];; for n in [4..30] do a[n]:=2*a[n-1]+a[n-3]; od; Concatenation([1], a); # G. C. Greubel, Oct 15 2019
R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x^3)/(1-2*x-x^3) )); // G. C. Greubel, Oct 15 2019
spec := [S,{S=Sequence(Prod(Sequence(Prod(Z,Z,Z)),Union(Z,Z)))},unlabeled]: seq(combstruct[count](spec,size=n), n=0..20);
Join[{1},LinearRecurrence[{2,0,1},{2,4,8},30]] (* Harvey P. Dale, Jun 07 2012 *)
my(x='x+O('x^30)); Vec((1-x^3)/(1-2*x-x^3)) \\ G. C. Greubel, Oct 15 2019
def A052910_list(prec): P.= PowerSeriesRing(ZZ, prec) return P((1-x^3)/(1-2*x-x^3)).list() A052910_list(30) # G. C. Greubel, Oct 15 2019
Vec((1-x)^(-1)/(1+2*x+x^3)+O(x^99)) \\ Charles R Greathouse IV, Sep 27 2012
Exy:=[4,9]; [n le 2 select Exy[n] else Floor(Self(n-1)^2/Self(n-2) + 1/2): n in [1..40]]; // Bruno Berselli, Feb 05 2016
RecurrenceTable[{a[0] == 4, a[1] == 9, a[n] == Floor[a[n - 1]^2/a[n - 2] + 1/2]}, a, {n, 0, 30}] (* Bruno Berselli, Feb 05 2016 *) LinearRecurrence[{2,0,1},{4,9,20},40] (* Harvey P. Dale, Dec 19 2022 *)
Vec((4+x+2*x^2) / (1-2*x-x^3) + O(x^30)) \\ Jinyuan Wang, Mar 10 2020
Comments