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.

Previous Showing 21-30 of 63 results. Next

A090018 a(n) = 6*a(n-1) + 3*a(n-2) for n > 2, a(0)=1, a(1)=6.

Original entry on oeis.org

1, 6, 39, 252, 1629, 10530, 68067, 439992, 2844153, 18384894, 118841823, 768205620, 4965759189, 32099171994, 207492309531, 1341251373168, 8669985167601, 56043665125110, 362271946253463, 2341762672896108, 15137391876137037, 97849639275510546, 632510011281474387
Offset: 0

Views

Author

Paul Barry, Nov 19 2003

Keywords

Comments

From Johannes W. Meijer, Aug 09 2010: (Start)
a(n) represents the number of n-move routes of a fairy chess piece starting in a given corner or side square on a 3 X 3 chessboard. This fairy chess piece behaves like a white queen on the eight side and corner squares but on the central square the queen explodes with fury and turns into a red queen, see A180032. The central square leads to A180028. (End)

Crossrefs

Sequences with g.f. of the form 1/(1 - 6*x - k*x^2): A106392 (k=-10), A027471 (k=-9), A006516 (k=-8), A081179 (k=-7), A030192 (k=-6), A003463 (k=-5), A084326 (k=-4), A138395 (k=-3), A154244 (k=-2), A001109 (k=-1), A000400 (k=0), A005668 (k=1), A135030 (k=2), this sequence (k=3), A135032 (k=4), A015551 (k=5), A057089 (k=6), A015552 (k=7), A189800 (k=8), A189801 (k=9), A190005 (k=10), A015553 (k=11).

Programs

  • Magma
    [n le 2 select 6^(n-1) else 6*Self(n-1)+3*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Nov 15 2011
    
  • Maple
    a:= n-> (<<0|1>, <3|6>>^n. <<1,6>>)[1,1]:
    seq(a(n), n=0..30);  # Alois P. Heinz, Jan 17 2011
  • Mathematica
    Join[{a=1,b=6},Table[c=6*b+3*a;a=b;b=c,{n,100}]] (* Vladimir Joseph Stephan Orlovsky, Jan 16 2011 *)
    LinearRecurrence[{6,3}, {1,6}, 41] (* G. C. Greubel, Oct 10 2022 *)
  • PARI
    my(x='x+O('x^30)); Vec(1/(1-6*x-3*x^2)) \\ G. C. Greubel, Jan 24 2018
  • Sage
    [lucas_number1(n,6,-3) for n in range(1, 31)] # Zerinvary Lajos, Apr 24 2009
    

Formula

a(n) = (3+2*sqrt(3))^n*(sqrt(3)/4+1/2) + (1/2-sqrt(3)/4)*(3-2*sqrt(3))^n.
a(n) = (-i*sqrt(3))^n * ChebyshevU(n, isqrt(3)), i^2=-1.
From Johannes W. Meijer, Aug 09 2010: (Start)
G.f.: 1/(1 - 6*x - 3*x^2).
Limit_{k->oo} a(n+k)/a(k) = A141041(n) + A090018(n-1)*sqrt(12) for n >= 1.
Limit_{n->oo} A141041(n)/A090018(n-1) = sqrt(12). (End)
a(n) = Sum_{k=0..n} A099089(n,k)*3^k. - Philippe Deléham, Nov 21 2011
E.g.f.: exp(3*x)*(2*cosh(2*sqrt(3)*x) + sqrt(3)*sinh(2*sqrt(3)*x))/2. - Stefano Spezia, Apr 23 2025

Extensions

Typo in Mathematica program corrected by Vincenzo Librandi, Nov 15 2011

A120908 Sum of the lengths of the drops in all ternary words of length n on {0,1,2}. The drops of a ternary word on {0,1,2} are the subwords 10,20 and 21, their lengths being the differences 1, 2 and 1, respectively.

Original entry on oeis.org

0, 4, 24, 108, 432, 1620, 5832, 20412, 69984, 236196, 787320, 2598156, 8503056, 27634932, 89282088, 286978140, 918330048, 2927177028, 9298091736, 29443957164, 92980917360, 292889889684, 920511081864, 2887057484028
Offset: 1

Views

Author

Emeric Deutsch, Jul 15 2006

Keywords

Comments

a(n) = 4*A027471(n).
a(n) = Sum_{k>=0} k*A120907(n,k).

Examples

			a(2)=4 because the ternary words 00,01,02,11,12 and 22 have no drops, each of the words 10 and 21 has one drop of length 1 and the word 20 has one drop of length 2.
		

Crossrefs

Programs

  • Magma
    [4*(n-1)*3^(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 09 2011
    
  • Maple
    seq(4*(n-1)*3^(n-2),n=1..27);
  • Mathematica
    Table[4*(n-1)*3^(n-2), {n, 30}] (* Wesley Ivan Hurt, Jan 28 2014 *)
    LinearRecurrence[{6,-9},{0,4},30] (* Harvey P. Dale, Jul 14 2023 *)
  • PARI
    a(n) = 4*(n-1)*3^(n-2); \\ Altug Alkan, May 16 2018

Formula

a(n) = 4*(n-1)*3^(n-2).
G.f.: 4*z^2/(1-3*z)^2.

A064017 Number of ternary trees (A001764) with n nodes and maximal diameter.

Original entry on oeis.org

1, 3, 12, 45, 162, 567, 1944, 6561, 21870, 72171, 236196, 767637, 2480058, 7971615, 25509168, 81310473, 258280326, 817887699, 2582803260, 8135830269, 25569752274, 80196041223, 251048476872, 784526490225, 2447722649502
Offset: 1

Views

Author

Danail Bonchev (bonchevd(AT)aol.com), Sep 07 2001

Keywords

Comments

A problem important for polymer science because it counts the trees having unbranched branches; they are called "combs".
Equals (1, 3, 9, 27, 81, ...) convolved with (1, 0, 3, 9, 27, 81, ...). Example: a(5) = 162 = (81, 27, 9, 3, 1) dot (1, 0, 3, 9, 27) = 81 + 3*27. - Gary W. Adamson, Jul 31 2010
Floretion Algebra Multiplication Program, FAMP Code: lesforseq[ - 'i + 'j - 'kk' - 'ki' - 'kj' ], vesforseq(n) = 3^n, tesforseq = A006234

Examples

			a(5) = 162 because we can write (5+1)*3^(5-2) = 6*3^3 = 6*27.
		

Crossrefs

Programs

  • Maple
    a:=n->ceil(sum(3^(n-2),j=0..n)): seq(a(n), n=1..26); # Zerinvary Lajos, Jun 05 2008
  • Mathematica
    Join[{1},Table[(n+1)3^(n-2),{n,2,30}]] (* or *) Join[{1}, LinearRecurrence[ {6,-9},{3,12},30]] (* Harvey P. Dale, Feb 07 2012 *)
  • PARI
    { for (n=1, 200, if (n>1, a=(n + 1)*p; p*=3, a=p=1); write("b064017.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 06 2009
    
  • PARI
    a(n)=if(n==1, 1, (n+1)*3^(n-2)); \\ Joerg Arndt, May 06 2013
    
  • SageMath
    @CachedFunction
    def BB(n, k, x):  # modified cardinal B-splines
        if n == 1: return 0 if (x < 0) or (x >= k) else 1
        return x*BB(n-1, k, x) + (n*k-x)*BB(n-1, k, x-k)
    def EulerianPolynomial(n, k, x):
        if n == 0: return 1
        return add(BB(n+1, k, k*m+1)*x^m for m in (0..n))
    def A064017(n) : return 3^(n-1)*EulerianPolynomial(1,n-1,1/3) if n != 1 else 1
    [A064017(n) for n in (1..25)]  # Peter Luschny, May 04 2013

Formula

a(n) = 3*a(n-1) + 3^(n-2).
a(n) = (n+1)*3^(n-2), for n > 1.
From Paul Barry, Sep 05 2003: (Start)
a(n) = (n+2)3^(n-1) + 0^n/3 (offset 0).
a(n) = A025192(n) + A027471(n). (End)
A006234(n+4) - a(n+2) = 3^n. - Creighton Dement, Mar 01 2005
a(n+1) = Sum_{k=0..n} A196389(n,k)*3^k. - Philippe Deléham, Oct 31 2011
G.f.: (1 - 3*x + 3*x^2)*x/(1 - 3*x)^2. - Philippe Deléham, Oct 31 2011
a(n) = 6*a(n-1) - 9*a(n-2), with a(1)=1, a(2)=3, a(3)=12. - Harvey P. Dale, Feb 07 2012
E.g.f.: (exp(3*x)*(1 + 3*x) - 1)/9. - Stefano Spezia, Mar 05 2020
From Amiram Eldar, Jan 18 2021: (Start)
Sum_{n>=1} 1/a(n) = 27*log(3/2) - 19/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = 17/2 - 27*log(4/3). (End)

A336951 E.g.f.: 1 / (1 - x * exp(3*x)).

Original entry on oeis.org

1, 1, 8, 69, 780, 11145, 191178, 3823785, 87406056, 2247785073, 64228084110, 2018771719569, 69221032558956, 2571290056399545, 102860527370221026, 4408690840306136505, 201557641172689004112, 9790792086366911655009, 503570143277542340304534
Offset: 0

Views

Author

Ilya Gutkovskiy, Aug 08 2020

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 18; CoefficientList[Series[1/(1 - x Exp[3 x]), {x, 0, nmax}], x] Range[0, nmax]!
    Join[{1}, Table[n! Sum[(3 (n - k))^k/k!, {k, 0, n}], {n, 1, 18}]]
    a[0] = 1; a[n_] := a[n] = Sum[Binomial[n, k] k 3^(k - 1) a[n - k], {k, 1, n}]; Table[a[n], {n, 0, 18}]
  • PARI
    seq(n)={ Vec(serlaplace(1 / (1 - x*exp(3*x + O(x^n))))) } \\ Andrew Howroyd, Aug 08 2020

Formula

a(n) = n! * Sum_{k=0..n} (3 * (n-k))^k / k!.
a(0) = 1; a(n) = Sum_{k=1..n} binomial(n,k) * k * 3^(k-1) * a(n-k).
a(n) ~ n! * (3/LambertW(3))^n / (1 + LambertW(3)). - Vaclav Kotesovec, Aug 09 2021

A192015 Arithmetic derivative of prime powers: a(n) = A003415(A000961(n)).

Original entry on oeis.org

0, 1, 1, 4, 1, 1, 12, 6, 1, 1, 32, 1, 1, 1, 10, 27, 1, 1, 80, 1, 1, 1, 1, 14, 1, 1, 1, 192, 1, 1, 1, 1, 108, 1, 1, 1, 1, 1, 1, 1, 1, 22, 75, 1, 448, 1, 1, 1, 1, 1, 1, 1, 1, 26, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 405, 1, 1024, 1, 1, 1, 1, 1, 1, 1, 34
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 26 2011

Keywords

Comments

a(A000040(n)) = 1; a(A002808(n)) > 1;
A001787, A027471, A100484, A079705 and A051674 are subsequences;
A001787 and A024622 give record values and where they occur;
A192016(n) = A003415(a(n)).

Programs

  • Haskell
    a192015 = a003415 . a000961  -- Reinhard Zumkeller, Apr 16 2014
    
  • Mathematica
    Join[{0}, Reap[For[n = 1, n <= 300, n++, f = FactorInteger[n]; If[Length[f] == 1, Sow[n*Total[Apply[#2/#1&, f, {1}]]]]]][[2, 1]]] (* Jean-François Alcover, Feb 21 2014 *)
  • Python
    from sympy import primepi, integer_nthroot, factorint
    def A192015(n):
        if n == 1: return 0
        def f(x): return int(n+x-1-sum(primepi(integer_nthroot(x,k)[0]) for k in range(1,x.bit_length())))
        m, k = n, f(n)
        while m != k:
            m, k = k, f(k)
        return sum((m*e//p for p,e in factorint(m).items())) # Chai Wah Wu, Aug 15 2024

Formula

a(n) = A025474(n) * A025473(n)^(A025474(n) - 1).

A288834 a(n) = (n+1) * 3^(n-1).

Original entry on oeis.org

2, 9, 36, 135, 486, 1701, 5832, 19683, 65610, 216513, 708588, 2302911, 7440174, 23914845, 76527504, 243931419, 774840978, 2453663097, 7748409780, 24407490807, 76709256822, 240588123669, 753145430616, 2353579470675, 7343167948506, 22876792454961
Offset: 1

Views

Author

Gregory Gerard Wojnar, Jun 17 2017

Keywords

Crossrefs

Programs

Formula

O.g.f.: z*(2-3*z)/(1-3*z)^2.
a(n) = -A287768(n+1,2).
a(n) = (n+1)*A000244(n-1). - Felix Fröhlich, Jun 19 2017
a(n) = A027471(n)/3 for n >= 3. - Art Baker, Apr 12 2019
From Amiram Eldar, Jan 18 2021: (Start)
Sum_{n>=1} 1/a(n) = 9*log(3/2) - 3.
Sum_{n>=1} (-1)^(n+1)/a(n) = 3 - 9*log(4/3). (End)

A099097 Riordan array (1, 3+x).

Original entry on oeis.org

1, 0, 3, 0, 1, 9, 0, 0, 6, 27, 0, 0, 1, 27, 81, 0, 0, 0, 9, 108, 243, 0, 0, 0, 1, 54, 405, 729, 0, 0, 0, 0, 12, 270, 1458, 2187, 0, 0, 0, 0, 1, 90, 1215, 5103, 6561, 0, 0, 0, 0, 0, 15, 540, 5103, 17496, 19683, 0, 0, 0, 0, 0, 1, 135, 2835, 20412, 59049, 59049, 0, 0, 0, 0, 0, 0, 18, 945, 13608, 78732, 196830, 177147
Offset: 0

Views

Author

Paul Barry, Sep 25 2004

Keywords

Comments

Row sums are A006190(n+1). Diagonal sums are A052931. The Riordan array (1, s+tx) defines T(n,k) = binomial(k,n-k)*s^k*(t/s)^(n-k). The row sums satisfy a(n) = s*a(n-1) + t*a(n-2) and the diagonal sums satisfy a(n) = s*a(n-2) + t*a(n-3).
Triangle T(n,k), 0 <= k <= n, read by rows given by [0, 1/3, -1/3, 0, 0, 0, 0, 0, ...] DELTA [3, 0, 0, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 10 2008

Examples

			Triangle begins:
  1;
  0, 3;
  0, 1, 9;
  0, 0, 6, 27;
  0, 0, 1, 27,  81;
  0, 0, 0,  9, 108, 243;
  ...
		

Crossrefs

Cf. A027465.
Diagonals are of the form 3^n*binomial(n+m, m): A000244 (m=0), A027471 (m=1), A027472 (m=2), A036216 (m=3), A036217 (m=4), A036219 (m=5), A036220 (m=6), A036221 (m=7), A036222 (m=8), A036223 (m=9), A172362 (m=10).

Programs

  • Mathematica
    Table[3^(2*k-n)*Binomial[k, n-k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, May 19 2021 *)
  • Sage
    flatten([[3^(2*k-n)*binomial(k, n-k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 19 2021

Formula

Triangle: T(n, k) = binomial(k, n-k)*3^k*(1/3)^(n-k).
G.f. of column k: (3*x + x^2)^k.
G.f.: 1/(1 - 3*y*x - y*x^2). - Philippe Deléham, Nov 21 2011
Sum_{k=0..n} T(n,k)*x^k = A000007(n), A006190(n+1), A135030(n+1), A181353(n+1) for x = 0,1,2,3 respectively. - Philippe Deléham, Nov 21 2011

A118441 Triangle L, read by rows, equal to the matrix log of A118435, with the property that L^2 consists of a single diagonal (two rows down from the main diagonal).

Original entry on oeis.org

0, 1, 0, -4, 2, 0, -12, 12, 3, 0, 32, -48, -24, 4, 0, 80, -160, -120, 40, 5, 0, -192, 480, 480, -240, -60, 6, 0, -448, 1344, 1680, -1120, -420, 84, 7, 0, 1024, -3584, -5376, 4480, 2240, -672, -112, 8, 0, 2304, -9216, -16128, 16128, 10080, -4032, -1008, 144, 9, 0
Offset: 0

Views

Author

Paul D. Hanna, Apr 28 2006

Keywords

Comments

L = log(A118435) = log(H*[C^-1]*H], where C=Pascal's triangle and H=A118433 where H^2 = I (identity matrix).

Examples

			The matrix log, L = log(H*[C^-1]*H], begins:
     0;
     1,     0;
    -4,     2,      0;
   -12,    12,      3,     0;
    32,   -48,    -24,     4,     0;
    80,  -160,   -120,    40,     5,     0;
  -192,   480,    480,  -240,   -60,     6,     0;
  -448,  1344,   1680, -1120,  -420,    84,     7,   0;
  1024, -3584,  -5376,  4480,  2240,  -672,  -112,   8,  0;
  2304, -9216, -16128, 16128, 10080, -4032, -1008, 144,  9,  0;
  ...
The matrix square, L^2, is a single diagonal:
  0;
  0, 0;
  2, 0,  0;
  0, 6,  0,  0;
  0, 0, 12,  0,  0;
  0, 0,  0, 20,  0,  0;
  0, 0,  0,  0, 30,  0,  0;
  ...
From _Peter Luschny_, Apr 23 2020: (Start)
In unsigned form and without the main diagonal, as computed by the Maple script:
  [0], [0]
  [1], [1]
  [2], [4,   2]
  [3], [12,  12,   3]
  [4], [32,  48,   24,   4]
  [5], [80,  160,  120,  40,   5]
  [6], [192, 480,  480,  240,  60,  6]
  [7], [448, 1344, 1680, 1120, 420, 84, 7] (End)
		

Crossrefs

Cf. A118435 (exp(L)), A118442 (column 0), A118443 (row sums), A027471 (unsigned row sums); A118433 (self-inverse triangle), A001815 (column 1?), A001789 (third of column 2?).

Programs

  • Maple
    # Generalized Worpitzky transform of the harmonic numbers.
    CL := p -> PolynomialTools:-CoefficientList(expand(p), x):
    H := n -> add(1/k, k=1..n):
    Trow := proc(n) local k,v; if n=0 then return [0] fi;
    add(add((-1)^(n-v)*binomial(k,v)*H(k)*(-x+v-1)^n, v=0..k), k=0..n); CL(%) end:
    for n from 0 to 7 do Trow(n) od; # Peter Luschny, Apr 23 2020
  • Mathematica
    nmax = 12;
    h[n_, k_] := Binomial[n, k]*(-1)^(Quotient[n+1, 2] - Quotient[k, 2]+n-k);
    H = Table[h[n, k], {n, 0, nmax}, {k, 0, nmax}];
    Cn = Table[Binomial[n, k], {n, 0, nmax}, {k, 0, nmax}];
    L = MatrixLog[H.Inverse[Cn].H ];
    Table[L[[n+1, k+1]], {n, 0, nmax}, {k, 0, n}] // Flatten (* Jean-François Alcover, Apr 08 2024 *)
  • PARI
    /* From definition of L as matrix log of H*C^-1*H: */
    {L(n,k)=local(H=matrix(n+1,n+1,r,c,if(r>=c,binomial(r-1,c-1)*(-1)^(r\2-(c-1)\2+r-c))),C=matrix(n+1,n+1,r,c,if(r>=c,binomial(r-1,c-1))),N=(H*C^-1*H)); Log=sum(p=1,n+1,-(N^0-N)^p/p);Log[n+1,k+1]}
    for(n=0, 10, for(k=0, n, print1(L(n, k), ", ")); print(""))
    
  • PARI
    /* The matrix power L^m is given by: */
    {L(n,k,m)=if(m%2==0,if(n==k+m,n!/k!*2^(n-k-m)/(n-k-m)!), if(n>=k+m,n!/k!*2^(n-k-m)/(n-k-m)!*(-1)^(m\2+(n+1)\2-k\2+n-k)))}
    for(n=0, 10, for(k=0, n, print1(L(n, k,1), ", ")); print(""))

Formula

For even exponents of L, L^(2m) is a single diagonal:
if n == k+2m, then [L^(2m)](n,k) = n!/k!*2^(n-k-2m)/(n-k-2m)!; else if n != k+2m: [L^(2m)](n,k) = 0.
For odd exponents of L:
if n >= k+2m+1, then [L^(2m+1)](n,k) = n!/k!*2^(n-k-2m-1)/(n-k-2m-1)!*(-1)^(m+[(n+1)/2]-[k/2]+n-k); else if n < k+2m+1: [L^(2m)](n,k) = 0.
Unsigned row sums equals A027471(n+1) = n*3^(n-1).

A224524 Table read by antidiagonals: T(n,k) is the number of idempotent n X n 0..k matrices of rank 1.

Original entry on oeis.org

1, 1, 6, 1, 10, 27, 1, 14, 69, 108, 1, 18, 123, 404, 405, 1, 22, 195, 892, 2155, 1458, 1, 26, 273, 1716, 5845, 10830, 5103, 1, 30, 375, 2732, 13525, 36042, 52241, 17496, 1, 34, 477, 4324, 24575, 99774, 213647, 244648, 59049, 1, 38, 603, 6060, 44545, 208146, 705215, 1232504, 1120599, 196830
Offset: 1

Views

Author

R. H. Hardin, Apr 09 2013

Keywords

Comments

Table starts
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
6, 10, 14, 18, 22, 26, 30, 34, 38, ...
27, 69, 123, 195, 273, 375, 477, 603, ...
108, 404, 892, 1716, 2732, 4324, 6060, ...
405, 2155, 5845, 13525, 24575, 44545, ...
1458, 10830, 36042, 99774, 208146, ...
5103, 52241, 213647, 705215, ...
17496, 244648, ...
59049, ...
...

Examples

			Some solutions for n=3, k=4:
  1 0 0   0 4 4   0 0 0   0 4 2   1 2 1   0 0 0   0 1 0
  0 0 0   0 1 1   3 1 0   0 0 0   0 0 0   0 0 0   0 1 0
  1 0 0   0 0 0   0 0 0   0 2 1   0 0 0   1 4 1   0 0 0
		

Crossrefs

Column 1 is A027471(n+1).

Programs

  • Maple
    f:= proc(n,k)
      local tot, a1, a0, a2, m,u;
      tot:= 0;
      for a1 from 1 to n do
        for a0 from 0 to n-a1 do
          a2:= n-a1-a0;
          if a0 = 0 then tot:= tot + n!/(a1!*a2!)*a1*(k-1)^a2
          elif a2 = 0 then tot:= tot + n!/(a0!*a1!)*a1*(k+1)^a0
          else
            u:= n!/(a0!*a1!*a2!)*a1;
            for m from 2 to k do
              tot:= tot + u*((m-1)^a2 - (m-2)^a2)*(floor(k/m)+1)^a0
            od
          fi
      od od;
      tot
    end proc:
    seq(seq(f(i,j-i),i=1..j-1),j=2..20); # Robert Israel, Dec 15 2019
  • Mathematica
    Unprotect[Power]; 0^0 = 1; Protect[Power];
    f[n_, k_] := Module[{tot, a1, a0, a2, m, u}, tot = 0; For[a1 = 1, a1 <= n, a1++, For[a0 = 0, a0 <= n - a1, a0++, a2 = n - a1 - a0; Which[a0 == 0, tot = tot + n!/(a1!*a2!)*a1*(k - 1)^a2, a2 == 0, tot = tot + n!/(a0!*a1!)*a1*(k + 1)^a0, True, u = n!/(a0!*a1!*a2!)*a1; For[m = 2, m <= k, m++, tot = tot + u*((m - 1)^a2 - (m - 2)^a2)*(Floor[k/m] + 1)^a0]]]]; tot];
    Table[Table[f[i, j - i], {i, 1, j - 1}], {j, 2, 20}] // Flatten (* Jean-François Alcover, Feb 04 2023, after Robert Israel *)

A317497 Triangle T(n,k) = 3*T(n-1,k) + T(n-3,k-1) for k = 0..floor(n/3) with T(0,0) = 1 and T(n,k) = 0 for n or k < 0, read by rows.

Original entry on oeis.org

1, 3, 9, 27, 1, 81, 6, 243, 27, 729, 108, 1, 2187, 405, 9, 6561, 1458, 54, 19683, 5103, 270, 1, 59049, 17496, 1215, 12, 177147, 59049, 5103, 90, 531441, 196830, 20412, 540, 1, 1594323, 649539, 78732, 2835, 15, 4782969, 2125764, 295245, 13608, 135, 14348907, 6908733, 1082565, 61236, 945, 1
Offset: 0

Views

Author

Zagros Lalo, Jul 31 2018

Keywords

Comments

The numbers in rows of the triangle are along a "second layer" of skew diagonals pointing top-left in center-justified triangle given in A013610 ((1+3*x)^n) and along a "second layer" of skew diagonals pointing top-right in center-justified triangle given in A027465 ((3+x)^n), see links. (Note: First layer of skew diagonals in triangles of coefficients in expansions of (1+3*x)^n and (3+x)^n are given in A304236 and A304249 respectively.)
The coefficients in the expansion of 1/(1-3x-x^3) are given by the sequence generated by the row sums.
The row sums give A052541.
If s(n) is the row sum at n, then the ratio s(n)/s(n-1) is approximately 3.1038034027355..., when n approaches infinity.

Examples

			Triangle begins:
         1;
         3;
         9;
        27,        1;
        81,        6;
       243,       27;
       729,      108,       1;
      2187,      405,       9;
      6561,     1458,      54;
     19683,     5103,     270,      1;
     59049,    17496,    1215,     12;
    177147,    59049,    5103,     90;
    531441,   196830,   20412,    540,    1;
   1594323,   649539,   78732,   2835,   15;
   4782969,  2125764,  295245,  13608,  135;
  14348907,  6908733, 1082565,  61236,  945,  1;
  43046721, 22320522, 3897234, 262440, 5670, 18;
		

References

  • Shara Lalo and Zagros Lalo, Polynomial Expansion Theorems and Number Triangles, Zana Publishing, 2018, ISBN: 978-1-9995914-0-3, pp. 364-366

Crossrefs

Row sums give A052541.
Cf. A000244 (column 0), A027471 (column 1), A027472 (column 2), A036216 (column 3), A036217 (column 4).
Sequences of the form 3^(n-q*k)*binomial(n-(q-1)*k, k): A027465 (q=1), A304249 (q=2), this sequence (q=3), A318773 (q=4).

Programs

  • GAP
    Flat(List([0..16],n->List([0..Int(n/3)],k->3^(n-3*k)/(Factorial(n-3*k)*Factorial(k))*Factorial(n-2*k)))); # Muniru A Asiru, Aug 01 2018
    
  • Magma
    [3^(n-3*k)*Binomial(n-2*k,k): k in [0..Floor(n/3)], n in [0..24]]; // G. C. Greubel, May 12 2021
    
  • Mathematica
    T[n_, k_]:= T[n, k] = 3^(n-3k)(n-2k)!/((n-3k)! k!); Table[T[n, k], {n, 0, 15}, {k, 0, Floor[n/3]} ]//Flatten
    T[0, 0] = 1; T[n_, k_]:= T[n, k] = If[n<0 || k<0, 0, 3 T[n-1, k] + T[n-3, k-1]]; Table[T[n, k], {n, 0, 15}, {k, 0, Floor[n/3]}]//Flatten
  • Sage
    flatten([[3^(n-3*k)*binomial(n-2*k,k) for k in (0..n//3)] for n in (0..24)]) # G. C. Greubel, May 12 2021

Formula

T(n,k) = 3^(n-3*k) * (n-2*k)!/(k! * (n-3*k)!) where n is a nonnegative integer and k = 0..floor(n/3).
Previous Showing 21-30 of 63 results. Next