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.

Showing 1-6 of 6 results.

A330793 a(n) = A193737(2*n, n).

Original entry on oeis.org

1, 2, 8, 36, 170, 826, 4088, 20496, 103752, 529100, 2714140, 13989560, 72393412, 375877684, 1957199120, 10216355632, 53443289946, 280101010170, 1470508417340, 7731675774900, 40706787482130, 214580612067690, 1132389348358320, 5981916549623040, 31629125981208600
Offset: 0

Views

Author

Peter Luschny, Jan 10 2020

Keywords

Crossrefs

Cf. A193737.

Programs

  • Magma
    [1] cat [n le 2 select 2*(3*n-2) else ( 2*(11*n-3)*(n-1)*Self(n-1) + 3*(3*n-4)*(3*n-5)*Self(n-2) )/(5*n*(n-1)): n in [1..30]]; // G. C. Greubel, Oct 24 2023
    
  • Maple
    a := proc(n) option remember;
    if n < 3 then return [1, 2, 8][n+1] fi;
    ((60-81*n+27*n^2)*a(n-2) + (22*n^2-28*n+6)*a(n-1))/(5*n*(n-1)) end:
    seq(a(n), n=0..24);
    # Alternative:
    gf := x -> (16 + 8*hypergeom([2/3, 1/3], [1/2], (1+x)*27/32) +
    sqrt(18*(1+x))*hypergeom([7/6, 5/6], [3/2], (1+x)*27/32))/48:
    ser := series(gf(x), x, 32): evalf(%, 32):
    seq(round(coeff(%, x, n)), n=0..24);
    # Or:
    Gf := x -> (1/(3*sqrt(5 - 27*x)))*(sqrt(5 - 27*x) +
    2*sqrt(2)*cos((1/6)*arccos(1 - (27*(1 + x))/16)) +
    2*sqrt(6)*sin((1/3)*arcsin((3/4)*sqrt(3/2)*sqrt(1 + x)))):
    ser := series(Gf(x), x, 32): evalf(%, 32):
    seq(round(coeff(%,x,n)), n=0..24);
  • Mathematica
    a[n_]:= a[n]= If[n<3, 2^n*n!, (2*(n-1)*(11*n-3)*a[n-1] +3*(3*n-4)*(3*n -5)*a[n-2])/(5*n*(n-1))]; (* a=A330793 *)
    Table[a[n], {n,0,40}] (* G. C. Greubel, Oct 24 2023 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A330793
        if n<3: return (1,2,8)[n]
        else: return (2*(n-1)*(11*n-3)*a(n-1) + 3*(3*n-4)*(3*n-5)*a(n-2))/(5*n*(n-1))
    [a(n) for n in range(41)] # G. C. Greubel, Oct 24 2023

Formula

D-finite with recurrence a(n) = ( 2*(11*n-3)*(n-1)*a(n-1) + 3*(3*n - 4)*(3*n-5)*a(n-2) )/(5*n*(n-1)).
a(n) = [x^n] (16 + 8*hypergeometric2F1([2/3, 1/3], [1/2], (1+x)*27/32) + sqrt(18*(1+x))* hypergeometric2F1([7/6, 5/6], [3/2], (1+x)*27/32))/48.
a(n) = [x^n] (1/(3*sqrt(5 - 27*x)))*(sqrt(5 - 27*x) + 2*sqrt(2)*cos((1/6)*arccos(1 - (27*(1 + x))/16)) + 2*sqrt(6)*sin((1/3)*arcsin((3/4)*sqrt(3/2)*sqrt(1 + x)))).
a(n) ~ 2^(3/2) * 3^(3*n - 1/2) / (sqrt(Pi*n) * 5^(n + 1/2)). - Vaclav Kotesovec, Oct 24 2023

A330795 Evaluation of the polynomials given by the Riordan square of the Fibonacci sequence with a(0) = 1 (A193737) at 1/2 and normalized with 2^n.

Original entry on oeis.org

1, 3, 9, 39, 153, 615, 2457, 9831, 39321, 157287, 629145, 2516583, 10066329, 40265319, 161061273, 644245095, 2576980377, 10307921511, 41231686041, 164926744167, 659706976665, 2638827906663, 10555311626649, 42221246506599, 168884986026393, 675539944105575
Offset: 0

Views

Author

Peter Luschny, Jan 10 2020

Keywords

Crossrefs

Cf. A006131, A015521, A193737, A321620, A324969 (Fibonacci with a(0)=1).

Programs

  • Magma
    [1] cat [3*(4^n -(-1)^n)/5: n in [1..30]]; // G. C. Greubel, Sep 14 2023
    
  • Maple
    gf := (4*x^2 - 1)/(x*(4*x + 3) - 1): ser := series(gf, x, 32):
    seq(coeff(ser, x, n), n=0.. 25);
    # Alternative:
    gf:= (3/5)*exp(-x)*(exp(5*x) - 1) + 1: ser := series(gf, x, 32):
    seq(n!*coeff(ser, x, n), n=0.. 25);
    # Or:
    a := proc(n) option remember; if n < 3 then return [1, 3, 9][n + 1] fi;
    4*a(n-2) + 3*a(n-1) end: seq(a(n), n=0..25);
  • Mathematica
    LinearRecurrence[{3,4}, {1,3,9}, 31] (* G. C. Greubel, Sep 14 2023 *)
  • SageMath
    [3*(4^n -(-1)^n)//5 + int(n==0) for n in range(31)] # G. C. Greubel, Sep 14 2023

Formula

a(n) = 2^n*Sum_{k=0..n} A193737(n,k)/2^k.
a(n) = [x^n] (1 - 4*x^2)/(1 - x*(3 + 4*x)).
a(n) = n! [x^n] (3/5)*exp(-x)*(exp(5*x) - 1) + 1.
a(n) = 4*a(n-2) + 3*a(n-1).
a(n) = 3*A015521(n), n>0. - R. J. Mathar, Aug 19 2022

A193722 Triangular array: the fusion of (x+1)^n and (x+2)^n; see Comments for the definition of fusion.

Original entry on oeis.org

1, 1, 2, 1, 5, 6, 1, 8, 21, 18, 1, 11, 45, 81, 54, 1, 14, 78, 216, 297, 162, 1, 17, 120, 450, 945, 1053, 486, 1, 20, 171, 810, 2295, 3888, 3645, 1458, 1, 23, 231, 1323, 4725, 10773, 15309, 12393, 4374, 1, 26, 300, 2016, 8694, 24948, 47628, 58320, 41553, 13122
Offset: 0

Views

Author

Clark Kimberling, Aug 04 2011

Keywords

Comments

Suppose that p = p(n)*x^n + p(n-1)*x^(n-1) + ... + p(1)*x + p(0) is a polynomial and that Q is a sequence of polynomials
...
q(k,x)=t(k,0)*x^k+t(k,1)*x^(k-1)+...+t(k,k-1)*x+t(k,k),
...
for k=0,1,2,... The Q-upstep of p is the polynomial given by
...
U(p) = p(n)*q(n+1,x) + p(n-1)*q(n,x) + ... + p(0)*q(1,x); note that q(0,x) does not appear.
...
Now suppose that P=(p(n,x)) and Q=(q(n,x)) are sequences of polynomials, where n indicates degree. The fusion of P by Q, denoted by P**Q, is introduced here as the sequence W=(w(n,x)) of polynomials defined by w(0,x)=1 and w(n+1,x)=U(p(n,x)).
...
Strictly speaking, ** is an operation on sequences of polynomials. However, if P and Q are regarded as numerical triangles (e.g., coefficients of polynomials), then ** can be regarded as an operation on numerical triangles. In this case, row (n+1) of P**Q, for n >= 0, is given by the matrix product P(n)*QQ(n), where P(n)=(p(n,n)...p(n,n-1)......p(n,1), p(n,0)) and QQ(n) is the (n+1)-by-(n+2) matrix given by
...
q(n+1,0) .. q(n+1,1)........... q(n+1,n) .... q(n+1,n+1)
0 ......... q(n,0)............. q(n,n-1) .... q(n,n)
0 ......... 0.................. q(n-1,n-2) .. q(n-1,n-1)
...
0 ......... 0.................. q(2,1) ...... q(2,2)
0 ......... 0 ................. q(1,0) ...... q(1,1);
here, the polynomial q(k,x) is taken to be
q(k,0)*x^k + q(k,1)x^(k-1) + ... + q(k,k)*x+q(k,k-1); i.e., "q" is used instead of "t".
...
If s=(s(1),s(2),s(3),...) is a sequence, then the infinite square matrix indicated by
s(1)...s(2)...s(3)...s(4)...s(5)...
..0....s(1)...s(2)...s(3)...s(4)...
..0......0....s(1)...s(2)...s(3)...
..0......0.......0...s(1)...s(2)...
is the self-fusion matrix of s; e.g., A202453, A202670.
...
Example: let p(n,x)=(x+1)^n and q(n,x)=(x+2)^n. Then
...
w(0,x) = 1 by definition of W
w(1,x) = U(p(0,x)) = U(1) = p(0,0)*q(1,x) = 1*(x+2) = x+2;
w(2,x) = U(p(1,x)) = U(x+1) = q(2,x) + q(1,x) = x^2+5x+6;
w(3,x) = U(p(2,x)) = U(x^2+2x+1) = q(3,x) + 2q(2,x) + q(1,x) = x^3+8x^2+21x+18;
...
From these first 4 polynomials in the sequence P**Q, we can write the first 4 rows of P**Q when P, Q, and P**Q are regarded as triangles:
1;
1, 2;
1, 5, 6;
1, 8, 21, 18;
...
Generally, if P and Q are the sequences given by p(n,x)=(ax+b)^n and q(n,x)=(cx+d)^n, then P**Q is given by (cx+d)(bcx+a+bd)^n.
...
In the following examples, r(P**Q) is the mirror of P**Q, obtained by reversing the rows of P**Q.
...
..P...........Q.........P**Q.......r(P**Q)
(x+1)^n.....(x+1)^n.....A081277....A118800 (unsigned)
(x+1)^n.....(x+2)^n.....A193722....A193723
(x+2)^n.....(x+1)^n.....A193724....A193725
(x+2)^n.....(x+2)^n.....A193726....A193727
(x+2)^n.....(2x+1)^n....A193728....A193729
(2x+1)^n....(x+1)^n.....A038763....A136158
(2x+1)^n....(2x+1)^n....A193730....A193731
(2x+1)^n,...(x+1)^n.....A193734....A193735
...
Continuing, let u denote the polynomial x^n+x^(n-1)+...+x+1, and let Fibo[n,x] denote the n-th Fibonacci polynomial.
...
P.............Q.........P**Q.......r(P**Q)
Fib[n+1,x]...(x+1)^n....A193736....A193737
u.............u.........A193738....A193739
u**u..........u**u......A193740....A193741
...
Regarding A193722:
col 1 ..... A000012
col 2 ..... A016789
col 3 ..... A081266
w(n,n) .... A025192
w(n,n-1) .. A081038
...
Associated with "upstep" as defined above is "downstep" defined at A193842 in connection with fission.

Examples

			First six rows:
  1;
  1,   2;
  1,   5,   6;
  1,   8,  21,  18;
  1,  11,  45,  81,  54;
  1,  14,  78, 216, 297, 162;
		

Crossrefs

Programs

  • GAP
    Flat(List([0..10], n-> List([0..n], k-> 3^(k-1)*( Binomial(n-1,k) + 2*Binomial(n,k) ) ))); # G. C. Greubel, Feb 18 2020
  • Magma
    [3^(k-1)*( Binomial(n-1,k) + 2*Binomial(n,k) ): k in [0..n], n in [0..10]]; // G. C. Greubel, Feb 18 2020
    
  • Maple
    fusion := proc(p, q, n) local d, k;
    p(n-1,0)*q(n,x)+add(coeff(p(n-1,x),x^k)*q(n-k,x), k=1..n-1);
    [1,seq(coeff(%,x,n-1-k), k=0..n-1)] end:
    p := (n, x) -> (x + 1)^n; q := (n, x) -> (x + 2)^n;
    A193722_row := n -> fusion(p, q, n);
    for n from 0 to 5 do A193722_row(n) od; # Peter Luschny, Jul 24 2014
  • Mathematica
    (* First program *)
    z = 9; a = 1; b = 1; c = 1; d = 2;
    p[n_, x_] := (a*x + b)^n ; q[n_, x_] := (c*x + d)^n
    t[n_, k_] := Coefficient[p[n, x], x^k]; t[n_, 0] := p[n, x] /. x -> 0;
    w[n_, x_] := Sum[t[n, k]*q[n + 1 - k, x], {k, 0, n}]; w[-1, x_] := 1
    g[n_] := CoefficientList[w[n, x], {x}]
    TableForm[Table[Reverse[g[n]], {n, -1, z}]]
    Flatten[Table[Reverse[g[n]], {n, -1, z}]] (* A193722 *)
    TableForm[Table[g[n], {n, -1, z}]]
    Flatten[Table[g[n], {n, -1, z}]] (* A193723 *)
    (* Second program *)
    Table[3^(k-1)*(Binomial[n-1,k] +2*Binomial[n,k]), {n,0,10}, {k,0,n}]//Flatten (* G. C. Greubel, Feb 18 2020 *)
  • PARI
    T(n,k) = 3^(k-1)*(binomial(n-1,k) +2*binomial(n,k)); \\ G. C. Greubel, Feb 18 2020
    
  • Sage
    def fusion(p, q, n):
        F = p(n-1,0)*q(n,x)+add(expand(p(n-1,x)).coefficient(x,k)*q(n-k,x) for k in (1..n-1))
        return [1]+[expand(F).coefficient(x,n-1-k) for k in (0..n-1)]
    A193842_row = lambda k: fusion(lambda n,x: (x+1)^n, lambda n,x: (x+2)^n, k)
    for n in range(7): A193842_row(n) # Peter Luschny, Jul 24 2014
    

Formula

Triangle T(n,k), read by rows, given by [1,0,0,0,0,0,0,0,...] DELTA [2,1,0,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Oct 04 2011
T(n,k) = 3*T(n-1,k-1) + T(n-1,k) with T(0,0)=T(1,0)=1 and T(1,1)=2. - Philippe Deléham, Oct 05 2011
T(n, k) = 3^(k-1)*( binomial(n-1,k) + 2*binomial(n,k) ). - G. C. Greubel, Feb 18 2020

A119915 Number of ternary words of length n and having exactly one run of 0's of odd length.

Original entry on oeis.org

0, 1, 4, 13, 40, 117, 332, 921, 2512, 6761, 18004, 47525, 124536, 324317, 840092, 2166065, 5562272, 14232273, 36300196, 92321085, 234192584, 592695109, 1496810732, 3772761289, 9492450672, 23844342073, 59804611060, 149787196117
Offset: 0

Views

Author

Emeric Deutsch, May 29 2006

Keywords

Comments

Column 1 of A119914.

Examples

			a(3) = 13 because we have 000, 011, 012, 021, 022, 101, 102, 110, 120, 201, 202, 210 and 220 (for example, 001, 020 do not qualify).
		

Crossrefs

Programs

  • Maple
    g := z*(1-z^2)/(1-2*z-z^2)^2:
    gser := series(g,z=0,34):
    seq(coeff(gser,z,n), n=0..30);
  • Mathematica
    LinearRecurrence[ {4, -2, -4, -1}, {0, 1, 4, 13}, 28] (* Peter Luschny, Jan 14 2020 *)

Formula

a(n) = [z^n] z*(1 - z^2)/(1 - 2*z - z^2)^2.
a(n) = A006645(n+1) - A006645(n-1). - R. J. Mathar, Aug 07 2015
From Peter Luschny, Jan 14 2020: (Start)
a(n) = Sum_{k=0..n} A193737(n, k)*k.
Let h(k) = (1 + k)*exp((1 + k)*x)*(1 + x - 1/k)/4 then
a(n) = n!*[x^n](h(sqrt(2)) + h(-sqrt(2))). (End)

A193736 Triangular array: the fusion of polynomial sequences P and Q given by p(n,x) = (n+1)-st Fibonacci polynomial and q(n,x) = (x+1)^n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 4, 2, 1, 4, 8, 8, 3, 1, 5, 13, 19, 15, 5, 1, 6, 19, 36, 42, 28, 8, 1, 7, 26, 60, 91, 89, 51, 13, 1, 8, 34, 92, 170, 216, 182, 92, 21, 1, 9, 43, 133, 288, 446, 489, 363, 164, 34, 1, 10, 53, 184, 455, 826, 1105, 1068, 709, 290, 55, 1, 11, 64, 246, 682, 1414, 2219, 2619, 2266, 1362, 509, 89
Offset: 0

Views

Author

Clark Kimberling, Aug 04 2011

Keywords

Comments

See A193722 for the definition of fusion of two sequences of polynomials or triangular arrays.

Examples

			First six rows:
  1;
  1,  1;
  1,  2,  1;
  1,  3,  4,  2;
  1,  4,  8,  8,  3;
  1,  5, 13, 19, 15,  5;
		

Crossrefs

Cf. A000007, A005314 (diagonal sums), A052542 (row sums), A077962.

Programs

  • Magma
    function T(n,k) // T = A193736
      if k lt 0 or n lt 0 then return 0;
      elif n lt 3 then return Binomial(n,k);
      else return T(n-1, k) + T(n-1, k-1) + T(n-2, k-2);
      end if;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 24 2023
    
  • Mathematica
    (* First program *)
    p[0, x_] := 1
    p[n_, x_] := Fibonacci[n + 1, x] /; n > 0
    q[n_, x_] := (x + 1)^n
    t[n_, k_] := Coefficient[p[n, x], x^(n - k)];
    t[n_, n_] := p[n, x] /. x -> 0;
    w[n_, x_] := Sum[t[n, k]*q[n - k + 1, x], {k, 0, n}]; w[-1, x_] := 1
    g[n_] := CoefficientList[w[n, x], {x}]
    TableForm[Table[Reverse[g[n]], {n, -1, z}]]
    Flatten[Table[Reverse[g[n]], {n, -1, z}]] (* A193736 *)
    TableForm[Table[g[n], {n, -1, z}]]
    Flatten[Table[g[n], {n, -1, z}]]          (* A193737 *)
    (* Second program *)
    T[n_, k_]:= T[n, k]= If[n<3, Binomial[n, k], T[n-1,k] +T[n-1,k-1] +T[n -2,k-2]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//TableForm (* G. C. Greubel, Oct 24 2023 *)
  • SageMath
    def T(n,k): # T = A193736
        if (n<3): return binomial(n,k)
        else: return T(n-1,k) +T(n-1,k-1) +T(n-2,k-2)
    flatten([[T(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Oct 24 2023

Formula

T(0,0) = T(1,0) = T(1,1) = T(2,0) = T(2,2) = 1; T(n,k) = 0 if k<0 or k>n; T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k-2). - Philippe Deléham, Feb 13 2020
From G. C. Greubel, Oct 24 2023: (Start)
T(n, k) = A193737(n, n-k).
T(n, n) = Fibonacci(n) + [n=0] = A324969(n+1).
T(n, n-1) = A029907(n).
Sum_{k=0..n} T(n, k) = A052542(n).
Sum_{k=0..n} (-1)^k * T(n, k) = A000007(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A005314(n) + [n=0].
Sum_{k=0..floor(n/2)} (-1)^k * T(n-k, k) = [n=0] + A077962(n-1). (End)

A331321 a(n) = [x^n] ((x^2 - 1)*(x^2 + x - 1))/(x^2 + 2*x - 1)^2.

Original entry on oeis.org

1, 3, 8, 23, 64, 175, 472, 1259, 3328, 8731, 22760, 59007, 152256, 391239, 1001656, 2556115, 6503936, 16505651, 41788616, 105571303, 266181440, 669923039, 1683255448, 4222878651, 10579130112, 26467818315, 66138242984, 165077936207, 411584855488, 1025162759287
Offset: 0

Views

Author

Peter Luschny, Jan 14 2020

Keywords

Crossrefs

Cf. A193737 (Fibonacci (with a(0)=1) triangle), A331319, A331320.

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 33); Coefficients(R!( (1 - x)*(1 + x)*(1-x-x^2) / (1-2*x-x^2)^2 )); // Marius A. Burtea, Jan 15 2020
  • Maple
    gf := ((x^2 - 1)*(x^2 + x - 1))/(x^2 + 2*x - 1)^2:
    ser := series(gf, x, 32): seq(coeff(ser, x, n), n=0..29);
  • Mathematica
    LinearRecurrence[{4,-2,-4,-1},{1,3,8,23,64},40] (* Harvey P. Dale, Feb 01 2022 *)
  • PARI
    Vec((1 - x)*(1 + x)*(1 - x - x^2) / (1 - 2*x - x^2)^2 + O(x^30)) \\ Colin Barker, Jan 14 2020
    

Formula

a(n) = Sum_{k=0..n} A193737(n, k)*(1 + k).
Let h(k) = (1 + k)*exp((1 + k)*x)*(2*x + 10 - 5*k)/8 then
a(n) = n!*[x^n](h(sqrt(2)) + h(-sqrt(2)) + 1).
From Colin Barker, Jan 14 2020: (Start)
a(n) = 4*a(n-1) - 2*a(n-2) - 4*a(n-3) - a(n-4) for n>4.
a(n) = (-5*sqrt(2)*((1-sqrt(2))^n - (1+sqrt(2))^n) + 2*((1-sqrt(2))^n + (1+sqrt(2))^n)*n) / 8 for n>0.
(End)
Showing 1-6 of 6 results.