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-10 of 24 results. Next

A003945 Expansion of g.f. (1+x)/(1-2*x).

Original entry on oeis.org

1, 3, 6, 12, 24, 48, 96, 192, 384, 768, 1536, 3072, 6144, 12288, 24576, 49152, 98304, 196608, 393216, 786432, 1572864, 3145728, 6291456, 12582912, 25165824, 50331648, 100663296, 201326592, 402653184, 805306368, 1610612736, 3221225472, 6442450944, 12884901888
Offset: 0

Views

Author

Keywords

Comments

Coordination sequence for infinite tree with valency 3.
Number of Hamiltonian cycles in K_3 X P_n.
Number of ternary words of length n avoiding aa, bb, cc.
For n > 0, row sums of A029635. - Paul Barry, Jan 30 2005
Binomial transform is {1, 4, 13, 40, 121, 364, ...}, see A003462. - Philippe Deléham, Jul 23 2005
Convolved with the Jacobsthal sequence A001045 = A001786: (1, 4, 12, 32, 80, ...). - Gary W. Adamson, May 23 2009
Equals (n+1)-th row sums of triangle A161175. - Gary W. Adamson, Jun 05 2009
a(n) written in base 2: a(0) = 1, a(n) for n >= 1: 11, 110, 11000, 110000, ..., i.e.: 2 times 1, (n-1) times 0 (see A003953(n)). - Jaroslav Krizek, Aug 17 2009
INVERTi transform of A003688. - Gary W. Adamson, Aug 05 2010
An elephant sequence, see A175655. For the central square four A[5] vectors, with decimal values 42, 138, 162 and 168, lead to this sequence. For the corner squares these vectors lead to the companion sequence A083329. - Johannes W. Meijer, Aug 15 2010
A216022(a(n)) != 2 and A216059(a(n)) != 3. - Reinhard Zumkeller, Sep 01 2012
Number of length-n strings of 3 letters with no two adjacent letters identical. The general case (strings of r letters) is the sequence with g.f. (1+x)/(1-(r-1)*x). - Joerg Arndt, Oct 11 2012
Sums of pairs of rows of Pascal's triangle A007318, T(2n,k)+T(2n+1,k); Sum_{n>=1} A000290(n)/a(n) = 4. - John Molokach, Sep 26 2013

Crossrefs

Essentially same as A007283 (3*2^n) and A042950.
Generating functions of the form (1+x)/(1-k*x) for k=1 to 12: A040000, A003945, A003946, A003947, A003948, A003949, A003950, A003951, A003952.
Generating functions of the form (1+x)/(1-k*x) for k=13 to 30: A170732, A170733, A170734, A170735, A170736, A170737, A170738, A170739, A170740, A170741, A170742, A170743, A170744, A170745, A170746, A170747, A170748.
Generating functions of the form (1+x)/(1-k*x) for k=31 to 50: A170749, A170750, A170751, A170752, A170753, A170754, A170755, A170756, A170757, A170758, A170759, A170760, A170761, A170762, A170763, A170764, A170765, A170766, A170767, A170768, A170769.
Cf. A003688.

Programs

  • Maple
    k := 3; if n = 0 then 1 else k*(k-1)^(n-1); fi;
  • Mathematica
    Join[{1}, 3*2^Range[0, 60]] (* Vladimir Joseph Stephan Orlovsky, Jun 09 2011 *)
    Table[2^n+Floor[2^(n-1)], {n,0,30}] (* Martin Grymel, Oct 17 2012 *)
    CoefficientList[Series[(1+x)/(1-2x),{x,0,40}],x] (* or *) LinearRecurrence[ {2},{1,3},40] (* Harvey P. Dale, May 04 2017 *)
  • PARI
    a(n)=if(n,3<Charles R Greathouse IV, Jan 12 2012

Formula

a(0) = 1; for n > 0, a(n) = 3*2^(n-1).
a(n) = 2*a(n-1), n > 1; a(0)=1, a(1)=3.
More generally, the g.f. (1+x)/(1-k*x) produces the sequence [1, 1 + k, (1 + k)*k, (1 + k)*k^2, ..., (1+k)*k^(n-1), ...], with a(0) = 1, a(n) = (1+k)*k^(n-1) for n >= 1. Also a(n+1) = k*a(n) for n >= 1. - Zak Seidov and N. J. A. Sloane, Dec 05 2009
The g.f. (1+x)/(1-k*x) produces the sequence with closed form (in PARI notation) a(n)=(n>=0)*k^n+(n>=1)*k^(n-1). - Jaume Oliver Lafont, Dec 05 2009
Binomial transform of A000034. a(n) = (3*2^n - 0^n)/2. - Paul Barry, Apr 29 2003
a(n) = Sum_{k=0..n} (n+k)*binomial(n, k)/n. - Paul Barry, Jan 30 2005
a(n) = Sum_{k=0..n} A029653(n, k)*x^k for x = 1. - Philippe Deléham, Jul 10 2005
Binomial transform of A000034. Hankel transform is {1,-3,0,0,0,...}. - Paul Barry, Aug 29 2006
a(0) = 1, a(n) = 2 + Sum_{k=0..n-1} a(k) for n >= 1. - Joerg Arndt, Aug 15 2012
a(n) = 2^n + floor(2^(n-1)). - Martin Grymel, Oct 17 2012
E.g.f.: (3*exp(2*x) - 1)/2. - Stefano Spezia, Jan 31 2023

Extensions

Edited by N. J. A. Sloane, Dec 04 2009

A055830 Triangle T read by rows: diagonal differences of triangle A037027.

Original entry on oeis.org

1, 1, 0, 2, 1, 0, 3, 3, 1, 0, 5, 7, 4, 1, 0, 8, 15, 12, 5, 1, 0, 13, 30, 31, 18, 6, 1, 0, 21, 58, 73, 54, 25, 7, 1, 0, 34, 109, 162, 145, 85, 33, 8, 1, 0, 55, 201, 344, 361, 255, 125, 42, 9, 1, 0, 89, 365, 707, 850, 701, 413, 175, 52, 10, 1, 0, 144, 655, 1416, 1918, 1806, 1239, 630, 236, 63, 11, 1, 0
Offset: 0

Views

Author

Clark Kimberling, May 28 2000

Keywords

Comments

Or, coefficients of a generalized Lucas-Pell polynomial read by rows. - Philippe Deléham, Nov 05 2006
Equals A046854(shifted) * Pascal's triangle; where A046854 is shifted down one row and "1" inserted at (0,0). - Gary W. Adamson, Dec 24 2008

Examples

			Triangle begins:
   1
   1,   0
   2,   1,   0
   3,   3,   1,   0
   5,   7,   4,   1,   0
   8,  15,  12,   5,   1,   0
  13,  30,  31,  18,   6,   1,  0
  21,  58,  73,  54,  25,   7,  1, 0
  34, 109, 162, 145,  85,  33,  8, 1, 0
  55, 201, 344, 361, 255, 125, 42, 9, 1, 0
  ...
		

Crossrefs

Left-hand columns include A000045, A023610.
Row sums: A001333 (numerators of continued fraction convergents to sqrt(2)).
Cf. A122075 (another version).
Cf. A046854. - Gary W. Adamson, Dec 24 2008

Programs

  • Magma
    function T(n,k)
      if k lt 0 or k gt n then return 0;
      elif k eq 0 then return Fibonacci(n+1);
      elif n eq 1 and k eq 1 then return 0;
      else return T(n-1,k-1) + T(n-1,k) + T(n-2,k);
      end if; return T; end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 21 2020
    
  • Maple
    with(combinat);
    T:= proc(n, k) option remember;
          if k<0 or k>n then 0
        elif k=0 then fibonacci(n+1)
        elif n=1 and k=1 then 0
        else T(n-1, k-1) + T(n-1, k) + T(n-2, k)
          fi; end:
    seq(seq(T(n, k), k=0..n), n=0..12); # G. C. Greubel, Jan 21 2020
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[k==0, Fibonacci[n+1], If[n==1 && k==1, 0, T[n-1, k-1] + T[n-1, k] + T[n-2, k]]]]; Table[T[n, k], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Dec 19 2017 *)
  • PARI
    T(n,k) = if(k<0 || k>n, 0, if(k==0, fibonacci(n+1), if(n==1 && k==1, 0, T(n-1, k-1) + T(n-1, k) + T(n-2, k) )));
    for(n=0,12, for(k=0, n, print1(T(n,k), ", "))) \\ G. C. Greubel, Jan 21 2020
    
  • Sage
    @CachedFunction
    def T(n, k):
        if (k<0 or k>n): return 0
        elif (k==0): return fibonacci(n+1)
        elif (n==1 and k==1): return 0
        else: return T(n-1, k-1) + T(n-1, k) + T(n-2, k)
    [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jan 21 2020

Formula

G.f.: (1-y*z) / (1-y*(1+y+z)).
T(i, j) = R(i-j, j), where R(0, 0)=1, R(0, j)=0 for j >= 1, R(1, j)=1 for j >= 0, R(i, j) = Sum_{k=0..j} (R(i-2, k) + R(i-1, k)) for i >= 1, j >= 1.
Sum_{k=0..n} x^k*T(n,k) = A039834(n-2), A000012(n), A000045(n+1), A001333(n), A003688(n), A015448(n), A015449(n), A015451(n), A015453(n), A015454(n), A015455(n), A015456(n), A015457(n) for x= -2,-1,0,1,2,3,4,5,6,7,8,9,10. - Philippe Deléham, Oct 22 2006
Sum_{k=0..floor(n/2)} T(n-k,k) = A011782(n). - Philippe Deléham, Oct 22 2006
Triangle T(n,k), 0 <= k <= n, given by [1, 1, -1, 0, 0, 0, 0, 0, ...] DELTA [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938. - Philippe Deléham, Nov 05 2006
T(n,0) = Fibonacci(n+1) = A000045(n+1). Sum_{k=0..n} T(n,k) = A001333(n). T(n,k)=0 if k > n or if k < 0, T(0,0)=1, T(1,1)=0, T(n,k) = T(n-1,k-1) + T(n-1,k) + T(n-2,k). - Philippe Deléham, Nov 05 2006

Extensions

Edited by Ralf Stephan, Jan 12 2005

A052924 Expansion of g.f.: (1-x)/(1 - 3*x - x^2).

Original entry on oeis.org

1, 2, 7, 23, 76, 251, 829, 2738, 9043, 29867, 98644, 325799, 1076041, 3553922, 11737807, 38767343, 128039836, 422886851, 1396700389, 4612988018, 15235664443, 50319981347, 166195608484, 548906806799, 1812916028881
Offset: 0

Views

Author

encyclopedia(AT)pommard.inria.fr, Jan 25 2000

Keywords

Comments

Euler encountered this sequence when finding the largest root of z^2 - 3z - 1 = 0. - V. Frederick Rickey (fred-rickey(AT)usma.edu), Aug 20 2003
Let M = a triangle with the Pell series A000129 (1, 2, 5, 12, ...) in each column, with the leftmost column shifted upwards one row. A052924 starting (1, 2, 7, 23, ...) = lim_{n->infinity} M^n, the left-shifted vector considered as a sequence. - Gary W. Adamson, Jul 31 2010
a(n) is the number of compositions of n when there are 2 types of 1 and 3 types of other natural numbers. - Milan Janjic, Aug 13 2010
Equals partial sums of A108300 prefaced with a 1: (1, 1, 5, 16, 53, 175, 578, ...). - Gary W. Adamson, Feb 15 2012

References

  • L. Euler, Introductio in analysin infinitorum, 1748, section 338. English translation by John D. Blanton, Introduction to Analysis of the Infinite, 1988, Springer, p. 286.

Crossrefs

A108300 (first differences), A006190 (partial sums), A355981 (primes).

Programs

  • GAP
    a:=[1,2];; for n in [3..30] do a[n]:=3*a[n-1]+a[n-2]; od; a; # G. C. Greubel, Jun 09 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1-x)/(1-3*x-x^2) )); // G. C. Greubel, Jun 09 2019
    
  • Maple
    spec:= [S,{S=Sequence(Prod(Sequence(Z),Union(Z,Z,Prod(Z,Z))))}, unlabeled]: seq(combstruct[count](spec,size=n), n=0..30);
    seq(coeff(series((1-x)/(1-3*x-x^2), x, n+1), x, n), n = 0..30); # G. C. Greubel, Oct 16 2019
  • Mathematica
    CoefficientList[Series[(1-x)/(1-3*x-x^2), {x,0,30}], x] (* G. C. Greubel, Jun 09 2019 *)
  • PARI
    Vec((1-x)/(1-3*x-x^2)+O(x^30)) \\ Charles R Greathouse IV, Nov 20 2011
    
  • Sage
    ((1-x)/(1-3*x-x^2)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jun 09 2019
    

Formula

a(n) = 3*a(n-1) + a(n-2).
a(n) = Sum_{alpha=RootOf(-1+3*x+x^2)} (1/13)*(1+5*alpha)*alpha^(-1-n).
With offset 1: a(1)=1; for n > 1, a(n) = Sum_{i=1..3*n-4} a(ceiling(i/3)). - Benoit Cloitre, Jan 04 2004
Binomial transform of A006130. a(n) = (1/2 - sqrt(13)/26)*(3/2 - sqrt(13)/2)^n + (1/2 + sqrt(13)/26)*(3/2 + sqrt(13)/2)^n. - Paul Barry, Jul 20 2004
From Creighton Dement, Nov 04 2004: (Start)
a(n) = A006190(n+1) - A006190(n);
4*a(n) = 9*A006190(n+1) - A006497(n+1) - 2*A003688(n+1). (End)
Numerators in continued fraction [1, 2, 3, 3, 3, ...], where the latter = 0.69722436226...; the length of an inradius of a right triangle with legs 2 and 3. - Gary W. Adamson, Dec 19 2007
If p[1]=2, p[i]=3, (i>1), and if A is Hessenberg matrix of order n defined by: A[i,j] = p[j-i+1], (i<=j), A[i,j] = -1, (i=j+1), and A[i,j]=0 otherwise. Then, for n >= 1, a(n-1) = det A. - Milan Janjic, Apr 29 2010
a(n) = A006190(n) + A003688(n). - R. J. Mathar, Jul 06 2012
a(n) = Sum_{k=0..n-2} A168561(n-2,k)*3^k + 2 * Sum_{k=0..n-1} A168561(n-1,k)*3^k, n>0. - R. J. Mathar, Feb 14 2024
From Peter Bala, Jul 08 2025: (Start)
The following series telescope:
Sum_{n >= 1} 1/(a(n) + 3*(-1)^(n+1)/a(n)) = 1/2, since 1/(a(n) + 3*(-1)^(n+1)/a(n)) = b(n) - b(n+1), where b(n) = (1/3) * (a(n) + a(n-1)) / (a(n)*a(n-1)).
Sum_{n >= 1} (-1)^(n+1)/(a(n) + 3*(-1)^(n+1)/a(n)) = 1/6, since 1/(a(n) + 3*(-1)^(n+1)/a(n)) = c(n) + c(n+1), where c(n) = (1/3) * (a(n) - a(n-1)) / (a(n)*a(n-1)). (End)

Extensions

More terms from James Sellers, Jun 06 2000

A155116 a(n) = 3*a(n-1) + 3*a(n-2), n>2, a(0)=1, a(1)=2, a(2)=8.

Original entry on oeis.org

1, 2, 8, 30, 114, 432, 1638, 6210, 23544, 89262, 338418, 1283040, 4864374, 18442242, 69919848, 265086270, 1005018354, 3810313872, 14445996678, 54768931650, 207644784984, 787241149902, 2984657804658, 11315696863680, 42901064005014
Offset: 0

Views

Author

Philippe Deléham, Jan 20 2009

Keywords

Comments

From Johannes W. Meijer, Aug 14 2010: (Start)
A berserker sequence, see A180140 and A180147. For the central square 16 A[5] vectors with decimal values between 3 and 384 lead to this sequence. These vectors lead for the corner squares to A123620 and for the side squares to A180142.
This sequence belongs to a family of sequences with GF(x)=(1-(2*k-1)*x-k*x^2)/(1-3*x+(k-4)*x^2). Berserker sequences that are members of this family are A000007 (k=2), A155116 (k=1; this sequence), A000302 (k=0), 6*A179606 (k=-1; with leading 1 added) and 2*A180141 (k=-2; n>=1 and a(0)=1). Some other members of this family are (-2)*A003688 (k=3; with leading 1 added), (-4)*A003946 (k=4; with leading 1 added), (-6)*A002878 (k=5; with leading 1 added) and (-8)*A033484 (k=6; with leading 1 added).
Inverse binomial transform of A101368 (without the first leading 1).
(End)

Crossrefs

Sequences of the form a(n) = m*(a(n-1) + a(n-2)) with a(0)=1, a(1) = m-1, a(2) = m^2 -1: A155020 (m=2), this sequence (m=3), A155117 (m=4), A155119 (m=5), A155127 (m=6), A155130 (m=7), A155132 (m=8), A155144 (m=9), A155157 (m=10).

Programs

  • Magma
    m:=3; [1] cat [n le 2 select (m-1)*(m*n-(m-1)) else m*(Self(n-1) + Self(n-2)): n in [1..30]]; // G. C. Greubel, Mar 25 2021
    
  • Mathematica
    With[{m=3}, LinearRecurrence[{m, m}, {1, m-1, m^2-1}, 30]] (* G. C. Greubel, Mar 25 2021 *)
  • PARI
    Vec((1-x-x^2)/(1-3*x-3*x^2)+O(x^99)) \\ Charles R Greathouse IV, Jan 12 2012
    
  • Sage
    m=3; [1]+[-(m-1)*(sqrt(m)*i)^(n-2)*chebyshev_U(n, -sqrt(m)*i/2) for n in (1..30)] # G. C. Greubel, Mar 25 2021

Formula

G.f.: (1-x-x^2)/(1-3*x-3*x^2).
a(n) = 2*A125145(n-1), n>=1 .
a(n) = ( (2+4*A)*A^(-n-1) + (2+4*B)*B^(-n-1) )/21 with A=(-3+sqrt(21))/6 and B=(-3-sqrt(21))/6 for n>=1 with a(0)=1. [corrected by Johannes W. Meijer, Aug 12 2010]
Contribution from Johannes W. Meijer, Aug 14 2010: (Start)
a(n) = A123620(n)/2 for n>=1.
(End)
a(n) = (1/3)*[n=0] - 2*(sqrt(3)*i)^(n-2)*ChebyshevU(n, -sqrt(3)*i/2). - G. C. Greubel, Mar 25 2021

A135597 Square array read by antidiagonals: row m (m >= 1) satisfies b(0) = b(1) = 1; b(n) = m*b(n-1) + b(n-2).

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 7, 5, 1, 1, 5, 13, 17, 8, 1, 1, 6, 21, 43, 41, 13, 1, 1, 7, 31, 89, 142, 99, 21, 1, 1, 8, 43, 161, 377, 469, 239, 34, 1, 1, 9, 57, 265, 836, 1597, 1549, 577, 55, 1, 1, 10, 73, 407, 1633, 4341, 6765, 5116, 1393, 89, 1, 1, 11, 91, 593, 2906
Offset: 1

Views

Author

N. J. A. Sloane, Mar 02 2008

Keywords

Comments

For n > 1, the number of independent vertex sets in the graph K_m X P_{n-1}. For example, in K_3 X P_1 there are 4 independent vertex sets. - Andrew Howroyd, May 23 2017

Examples

			Array begins:
========================================================
m\n| 0 1 2  3   4    5     6      7       8        9
---|----------------------------------------------------
1  | 1 1 2  3   5    8    13     21      34       55 ...
2  | 1 1 3  7  17   41    99    239     577     1393 ...
3  | 1 1 4 13  43  142   469   1549    5116    16897 ...
4  | 1 1 5 21  89  377  1597   6765   28657   121393 ...
5  | 1 1 6 31 161  836  4341  22541  117046   607771 ...
6  | 1 1 7 43 265 1633 10063  62011  382129  2354785 ...
7  | 1 1 8 57 407 2906 20749 148149 1057792  7552693 ...
8  | 1 1 9 73 593 4817 39129 317849 2581921 20973217 ...
...
		

Crossrefs

Programs

  • Maple
    A135597 := proc(m,c) coeftayl( (m*x-x-1)/(x^2+m*x-1),x=0,c) ; end: for d from 1 to 15 do for c from 0 to d-1 do printf("%d,",A135597(d-c,c)) ; od: od: # R. J. Mathar, Apr 21 2008
  • Mathematica
    a[, 0] = a[, 1] = 1; a[m_, n_] := m*a[m, n-1] + a[m, n-2]; Table[a[m-n+1, n], {m, 0, 11}, {n, 0, m}] // Flatten (* Jean-François Alcover, Jan 20 2014 *)

Formula

O.g.f. row m: (mx-x-1)/(x^2+mx-1). - R. J. Mathar, Apr 21 2008

Extensions

More terms from R. J. Mathar, Apr 21 2008

A136158 Triangle whose rows are generated by A136157^n * [1, 1, 0, 0, 0, ...].

Original entry on oeis.org

1, 1, 1, 3, 4, 1, 9, 15, 7, 1, 27, 54, 36, 10, 1, 81, 189, 162, 66, 13, 1, 243, 648, 675, 360, 105, 16, 1, 729, 2187, 2673, 1755, 675, 153, 19, 1, 2187, 7290, 10206, 7938, 3780, 1134, 210, 22, 1, 6561, 24057, 37908, 34020, 19278, 7182, 1764, 276, 25, 1
Offset: 0

Views

Author

Gary W. Adamson, Dec 16 2007

Keywords

Comments

Triangle T(n,k), 0 <= k <= n, read by rows given by [1,2,0,0,0,0,0,0,0,0,...] DELTA [1,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Dec 17 2007
Equals A080419 when first column is removed (here). - Georg Fischer, Jul 25 2023

Examples

			First few rows of the triangle:
    1;
    1,    1;
    3,    4,    1;
    9,   15,    7,    1;
   27,   54,   36,   10,   1;
   81,  189,  162,   66,  13,   1;
  243,  648,  675,  360, 105,  16,  1;
  729, 2187, 2673, 1755, 675, 153, 19, 1;
  ...
		

Crossrefs

Programs

  • Magma
    A136158:= func< n,k | n eq 0 select 1 else 3^(n-k-1)*(n+2*k)* Binomial(n, k)/n >;
    [A136158(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Dec 22 2023; Dec 27 2023
    
  • Mathematica
    A136158[n_,k_]:= If[n==0, 1, 3^(n-k-1)*(n+2*k)*Binomial[n,k]/n];
    Table[A136158[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Dec 22 2023; Dec 27 2023 *)
  • PARI
    T(n,k) = if ((n<0) || (k<0), return(0)); if ((n==0) && (k==0), return(1)); if (n==1, if (k<=1, return(1))); 3*T(n-1,k) + T(n-1,k-1);
    tabl(nn) = for (n=0, nn, for (k=0, n, print1(T(n, k), ", ")); print); \\ Michel Marcus, Jul 25 2023
    
  • SageMath
    def A136158(n,k): return 1 if (n==0) else 3^(n-k-1)*((n+2*k)/n)*binomial(n, k)
    flatten([[A136158(n, k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Dec 22 2023; Dec 27 2023

Formula

Sum_{k=0..n} T(n, k) = A081294(n).
Given A136157 = M, an infinite lower triangular bidiagonal matrix with (3, 3, 3, ...) in the main diagonal, (1, 1, 1, ...) in the subdiagonal and the rest zeros; rows of A136157 are generated from M^n * [1, 1, 0, 0, 0, ...], given a(0) = 1.
T(n, k) = A038763(n,n-k). - Philippe Deléham, Dec 17 2007
T(n, k) = 3*T(n-1, k) + T(n-1, k-1) for n > 1, T(0,0) = T(1,1) = T(1,0) = 1. - Philippe Deléham, Oct 30 2013
Sum_{k=0..n} T(n, k)*x^k = (1+x)*(3+x)^(n-1), n >= 1. - Philippe Deléham, Oct 30 2013
G.f.: (1-2*x)/(1-3*x-x*y). - R. J. Mathar, Aug 11 2015
From G. C. Greubel, Dec 22 2023: (Start)
T(n, 0) = A133494(n).
T(n, 1) = A006234(n+2).
T(n, 2) = A080420(n-2).
T(n, 3) = A080421(n-3).
T(n, 4) = A080422(n-4).
T(n, 5) = A080423(n-5).
T(n, n) = A000012(n).
T(n, n-1) = A016777(n-1).
T(n, n-2) = A062741(n-1).
Sum_{k=0..n} (-1)^k * T(n, k) = 0^n = A000007(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A003688(n).
Sum_{k=0..floor(n/2)} (-1)^k * T(n-k, k) = A001519(n). (End)
From G. C. Greubel, Dec 27 2023: (Start)
T(n, k) = 3^(n-k-1)*(n+2*k)*binomial(n,k)/n, for n > 0, with T(0, 0) = 1.
T(n, k) = (-1)^k * A164948(n, k). (End)

Extensions

More terms from Philippe Deléham, Dec 17 2007

A286513 Array read by antidiagonals: T(m,n) is the number of independent sets in the stacked prism graph C_m X P_n.

Original entry on oeis.org

1, 1, 3, 1, 7, 4, 1, 17, 13, 7, 1, 41, 43, 35, 11, 1, 99, 142, 181, 81, 18, 1, 239, 469, 933, 621, 199, 29, 1, 577, 1549, 4811, 4741, 2309, 477, 47, 1, 1393, 5116, 24807, 36211, 26660, 8303, 1155, 76, 1, 3363, 16897, 127913, 276561, 307983, 143697, 30277, 2785, 123
Offset: 1

Views

Author

Andrew Howroyd, May 10 2017

Keywords

Comments

Equivalently, the number of vertex covers in the stacked prism graph C_m X P_n.

Examples

			Table starts:
=============================================================
m\n|   1    2     3      4        5         6           7
---|---------------------------------------------------------
1  |   1    1     1      1        1         1           1 ...
2  |   3    7    17     41       99       239         577 ...
3  |   4   13    43    142      469      1549        5116 ...
4  |   7   35   181    933     4811     24807      127913 ...
5  |  11   81   621   4741    36211    276561     2112241 ...
6  |  18  199  2309  26660   307983   3557711    41097664 ...
7  |  29  477  8303 143697  2488431  43089985   746156517 ...
8  |  47 1155 30277 788453 20546803 535404487 13951571713 ...
...
		

Crossrefs

Rows 3..8 are A003688(n+1), A051926, A181989, A181961, A182014, A182019.
Columns 1..4 are A000032, A051927, A050400, A050401.
Main diagonal is A212270.
Cf. A089934 (P_m X P_n), A027683, A286514.

A374439 Triangle read by rows: the coefficients of the Lucas-Fibonacci polynomials. T(n, k) = T(n - 1, k) + T(n - 2, k - 2) with initial values T(n, k) = k + 1 for k < 2.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 2, 3, 4, 1, 1, 2, 4, 6, 3, 2, 1, 2, 5, 8, 6, 6, 1, 1, 2, 6, 10, 10, 12, 4, 2, 1, 2, 7, 12, 15, 20, 10, 8, 1, 1, 2, 8, 14, 21, 30, 20, 20, 5, 2, 1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1, 1, 2, 10, 18, 36, 56, 56, 70, 35, 30, 6, 2
Offset: 0

Views

Author

Peter Luschny, Jul 22 2024

Keywords

Comments

There are several versions of Lucas and Fibonacci polynomials in this database. Our naming follows the convention of calling polynomials after the values of the polynomials at x = 1. This assumes a regular sequence of polynomials, that is, a sequence of polynomials where degree(p(n)) = n. This view makes the coefficients of the polynomials (the terms of a row) a refinement of the values at the unity.
A remarkable property of the polynomials under consideration is that they are dual in this respect. This means they give the Lucas numbers at x = 1 and the Fibonacci numbers at x = -1 (except for the sign). See the example section.
The Pell numbers and the dual Pell numbers are also values of the polynomials, at the points x = -1/2 and x = 1/2 (up to the normalization factor 2^n). This suggests a harmonized terminology: To call 2^n*P(n, -1/2) = 1, 0, 1, 2, 5, ... the Pell numbers (A000129) and 2^n*P(n, 1/2) = 1, 4, 9, 22, ... the dual Pell numbers (A048654).
Based on our naming convention one could call A162515 (without the prepended 0) the Fibonacci polynomials. In the definition above only the initial values would change to: T(n, k) = k + 1 for k < 1. To extend this line of thought we introduce A374438 as the third triangle of this family.
The triangle is closely related to the qStirling2 numbers at q = -1. For the definition of these numbers see A333143. This relates the triangle to A065941 and A103631.

Examples

			Triangle starts:
  [ 0] [1]
  [ 1] [1, 2]
  [ 2] [1, 2, 1]
  [ 3] [1, 2, 2,  2]
  [ 4] [1, 2, 3,  4,  1]
  [ 5] [1, 2, 4,  6,  3,  2]
  [ 6] [1, 2, 5,  8,  6,  6,  1]
  [ 7] [1, 2, 6, 10, 10, 12,  4,  2]
  [ 8] [1, 2, 7, 12, 15, 20, 10,  8,  1]
  [ 9] [1, 2, 8, 14, 21, 30, 20, 20,  5,  2]
  [10] [1, 2, 9, 16, 28, 42, 35, 40, 15, 10, 1]
.
Table of interpolated sequences:
  |  n | A039834 & A000045 | A000032 |   A000129   |   A048654  |
  |  n |     -P(n,-1)      | P(n,1)  |2^n*P(n,-1/2)|2^n*P(n,1/2)|
  |    |     Fibonacci     |  Lucas  |     Pell    |    Pell*   |
  |  0 |        -1         |     1   |       1     |       1    |
  |  1 |         1         |     3   |       0     |       4    |
  |  2 |         0         |     4   |       1     |       9    |
  |  3 |         1         |     7   |       2     |      22    |
  |  4 |         1         |    11   |       5     |      53    |
  |  5 |         2         |    18   |      12     |     128    |
  |  6 |         3         |    29   |      29     |     309    |
  |  7 |         5         |    47   |      70     |     746    |
  |  8 |         8         |    76   |     169     |    1801    |
  |  9 |        13         |   123   |     408     |    4348    |
		

Crossrefs

Triangles related to Lucas polynomials: A034807, A114525, A122075, A061896, A352362.
Triangles related to Fibonacci polynomials: A162515, A053119, A168561, A049310, A374441.
Sums include: A000204 (Lucas numbers, row), A000045 & A212804 (even sums, Fibonacci numbers), A006355 (odd sums), A039834 (alternating sign row).
Type m^n*P(n, 1/m): A000129 & A048654 (Pell, m=2), A108300 & A003688 (m=3), A001077 & A048875 (m=4).
Adding and subtracting the values in a row of the table (plus halving the values obtained in this way): A022087, A055389, A118658, A052542, A163271, A371596, A324969, A212804, A077985, A069306, A215928.
Columns include: A040000 (k=1), A000027 (k=2), A005843 (k=3), A000217 (k=4), A002378 (k=5).
Diagonals include: A000034 (k=n), A029578 (k=n-1), abs(A131259) (k=n-2).
Cf. A029578 (subdiagonal), A124038 (row reversed triangle, signed).

Programs

  • Magma
    function T(n,k) // T = A374439
      if k lt 0 or k gt n then return 0;
      elif k le 1 then return k+1;
      else return T(n-1,k) + T(n-2,k-2);
      end if;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jan 23 2025
    
  • Maple
    A374439 := (n, k) -> ifelse(k::odd, 2, 1)*binomial(n - irem(k, 2) - iquo(k, 2), iquo(k, 2)):
    # Alternative, using the function qStirling2 from A333143:
    T := (n, k) -> 2^irem(k, 2)*qStirling2(n, k, -1):
    seq(seq(T(n, k), k = 0..n), n = 0..10);
  • Mathematica
    A374439[n_, k_] := (# + 1)*Binomial[n - (k + #)/2, (k - #)/2] & [Mod[k, 2]];
    Table[A374439[n, k], {n, 0, 10}, {k, 0, n}]//Flatten (* Paolo Xausa, Jul 24 2024 *)
  • Python
    from functools import cache
    @cache
    def T(n: int, k: int) -> int:
        if k > n: return 0
        if k < 2: return k + 1
        return T(n - 1, k) + T(n - 2, k - 2)
    
  • Python
    from math import comb as binomial
    def T(n: int, k: int) -> int:
        o = k & 1
        return binomial(n - o - (k - o) // 2, (k - o) // 2) << o
    
  • Python
    def P(n, x):
        if n < 0: return P(n, x)
        return sum(T(n, k)*x**k for k in range(n + 1))
    def sgn(x: int) -> int: return (x > 0) - (x < 0)
    # Table of interpolated sequences
    print("|  n | A039834 & A000045 | A000032 |   A000129   |   A048654  |")
    print("|  n |     -P(n,-1)      | P(n,1)  |2^n*P(n,-1/2)|2^n*P(n,1/2)|")
    print("|    |     Fibonacci     |  Lucas  |     Pell    |    Pell*   |")
    f = "| {0:2d} | {1:9d}         |  {2:4d}   |   {3:5d}     |    {4:4d}    |"
    for n in range(10): print(f.format(n, -P(n, -1), P(n, 1), int(2**n*P(n, -1/2)), int(2**n*P(n, 1/2))))
    
  • SageMath
    from sage.combinat.q_analogues import q_stirling_number2
    def A374439(n,k): return (-1)^((k+1)//2)*2^(k%2)*q_stirling_number2(n+1, k+1, -1)
    print(flatten([[A374439(n, k) for k in range(n+1)] for n in range(13)])) # G. C. Greubel, Jan 23 2025

Formula

T(n, k) = 2^k' * binomial(n - k' - (k - k') / 2, (k - k') / 2) where k' = 1 if k is odd and otherwise 0.
T(n, k) = (1 + (k mod 2))*qStirling2(n, k, -1), see A333143.
2^n*P(n, -1/2) = A000129(n - 1), Pell numbers, P(-1) = 1.
2^n*P(n, 1/2) = A048654(n), dual Pell numbers.
T(2*n, n) = (1/2)*(-1)^n*( (1+(-1)^n)*A005809(n/2) - 2*(1-(-1)^n)*A045721((n-1)/2) ). - G. C. Greubel, Jan 23 2025

A180148 a(n) = 3*a(n-1) + a(n-2) with a(0)=2 and a(1)=5.

Original entry on oeis.org

2, 5, 17, 56, 185, 611, 2018, 6665, 22013, 72704, 240125, 793079, 2619362, 8651165, 28572857, 94369736, 311682065, 1029415931, 3399929858, 11229205505, 37087546373, 122491844624, 404563080245, 1336181085359, 4413106336322, 14575500094325, 48139606619297
Offset: 0

Views

Author

Johannes W. Meijer, Aug 13 2010

Keywords

Comments

Inverse binomial transform of A052961 (without the leading 1).
For n >= 1, also the number of matchings in the n-alkane graph. - Eric W. Weisstein, Jul 14 2021

Crossrefs

Appears in A180142.
Cf. A000602 (more information on n-alkanes).

Programs

  • Maple
    a:= n-> (<<0|1>, <1|3>>^n. <<2, 5>>)[1,1]:
    seq(a(n), n=0..27);  # Alois P. Heinz, Jul 14 2021
  • Mathematica
    LinearRecurrence[{3, 1}, {5, 7}, 20] (* Eric W. Weisstein, Jul 14 2021 *)
    CoefficientList[Series[(2 - x)/(1 - 3 x - x^2), {x, 0, 20}], x] (* Eric W. Weisstein, Jul 14 2021 *)
  • PARI
    a(n)=([0,1;1,3]^n*[2;5])[1,1] \\ Charles R Greathouse IV, Oct 13 2016

Formula

G.f.: (2-x)/(1-3*x-x^2).
a(n) = 3*a(n-1) + a(n-2) with a(0)=2 and a(1)=5.
a(n) = ((4+7*A)*A^(-n-1) + (4+7*B)*B^(-n-1))/13 with A = (-3+sqrt(13))/2 and B = (-3-sqrt(13))/2.
Lim_{k->infinity} a(n+k)/a(k) = (-1)^n*2/(A006497(n) - A006190(n)*sqrt(13)).
a(n) = 2 * Sum_{k=0..n-2} A168561(n-2,k)*3^k + 5 * Sum_{k=0..n-1} A168561(n-1,k)*3^k, n>0. - R. J. Mathar, Feb 14 2024
a(n) = 2*A006190(n+1) - A006190(n). - R. J. Mathar, Feb 14 2024

A259427 T(n,k)=Number of (n+1)X(k+1) 0..1 arrays with each 2X2 subblock having clockwise pattern 0000 0001 0011 or 0111.

Original entry on oeis.org

13, 43, 43, 142, 243, 142, 469, 1366, 1366, 469, 1549, 7695, 12953, 7695, 1549, 5116, 43347, 123306, 123306, 43347, 5116, 16897, 244228, 1172659, 1990133, 1172659, 244228, 16897, 55807, 1376077, 11155819, 32060569, 32060569, 11155819, 1376077
Offset: 1

Views

Author

R. H. Hardin, Jun 26 2015

Keywords

Comments

Table starts
.....13.......43........142...........469............1549...............5116
.....43......243.......1366..........7695...........43347.............244228
....142.....1366......12953........123306.........1172659...........11155819
....469.....7695.....123306.......1990133........32060569..........516880938
...1549....43347....1172659......32060569.......873754597........23840819225
...5116...244228...11155819.....516880938.....23840819225......1101527291223
..16897..1376077..106118138....8331704179....650266054724.....50866278137234
..55807..7753553.1009466878..134312969201..17738788220867...2349427850331898
.184318.43687910.9602626846.2165188798924.483879193637566.108508759637883502

Examples

			Some solutions for n=3 k=4
..0..0..1..1..0....0..0..0..1..0....1..0..0..1..1....1..1..0..1..1
..0..0..1..0..0....0..1..0..0..0....0..0..1..1..0....0..0..0..0..0
..0..0..0..0..1....0..1..1..0..1....0..0..0..0..0....0..0..0..0..1
..1..0..0..0..0....1..1..0..0..0....1..1..0..0..0....0..1..0..1..1
		

Crossrefs

Column 1 is A003688(n+2)

Formula

Empirical for column k:
k=1: a(n) = 3*a(n-1) +a(n-2)
k=2: a(n) = 6*a(n-1) +2*a(n-2) -22*a(n-3) -6*a(n-4) +6*a(n-5) +a(n-6)
k=3: [order 8]
k=4: [order 20]
k=5: [order 32]
k=6: [order 62]
Showing 1-10 of 24 results. Next