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-7 of 7 results.

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

Original entry on oeis.org

1, 1, 3, 8, 22, 60, 164, 448, 1224, 3344, 9136, 24960, 68192, 186304, 508992, 1390592, 3799168, 10379520, 28357376, 77473792, 211662336, 578272256, 1579869184, 4316282880, 11792304128, 32217174016, 88018956288, 240472260608, 656982433792, 1794909388800, 4903783645184, 13397386067968
Offset: 0

Views

Author

Philippe Deléham, Jan 19 2009

Keywords

Comments

Equals 1 followed by A028859. - Klaus Brockhaus, Jul 18 2009
a(n) is the number of ways to arrange 1- and 2-cent postage stamps (totaling n cents) in a row so that the first stamp is correctly placed and any subsequent stamp may (or not) be placed upside down.
Number of compositions of n into parts k >= 1 where there are F(k+1) = A000045(k+1) sorts of part k. - Joerg Arndt, Sep 30 2012
a(n) is the top-left entry of the n-th power of the 3 X 3 matrix [1, 1, 1; 1, 1, 1; 1, 1, 0] or of the 3 X 3 matrix [1, 1, 1; 1, 0, 1; 1, 1, 1].
From Tom Copeland, Nov 08 2014: (Start)
(Setting a(0)=0.)
This array is one of a family of Catalan arrays related by compositions of the special fractional linear (Möbius) transformations P(x,t) = x/(1-t*x); its inverse Pinv(x,t) = P(x,-t); and an o.g.f. of the Catalan numbers A000108, C(x) = (1-sqrt(1-4x))/2; and its inverse Cinv(x) = x*(1-x). (Cf. A091867.)
O.g.f.: G(x) = -P(P(Cinv(-x),1),1) = -P(Cinv(-x),2) = x(1+x)/(1-2x(1+x)) = (x+x^2)/(1-2(x+x^2)) = x + 3*x^2 + 8*x^3 + ... = A155020(x) with a(0)=0.
Ginv(x) = -C(P(P(-x,-1),-1)) = -C(P(-x,-2)) = (-1+sqrt(1+4*x/(1+2*x)))/2 = x*A064613(-x).
G(x) = x*(1+x) + 2*(x*(1+x))^2 + 2^2*(x*(1+x))^3 - ..., and so this array contains the row sums of A030528 * Diag(1, 2^1, 2^2, 2^3, ...). (End)
INVERT transform of Fibonacci(n+1). - Alois P. Heinz, Feb 11 2021

Examples

			a(2) = 3 because we have {1,1}, {1,_1} and {2}.
a(3) = 8 because we can order the stamps in eight ways: {1,1,1}  {1,1,_1}  {1,_1,1}  {1,_1,_1}  {2,1}   {2,_1}  {1,2}   {1,_2}, where _1 and _2 are upside down stamps.
a(4) = 22 = 2*3 + 2*8 because we can append 2 or _2 to the a(2) examples and 1 or _1 to the a(3) examples. - _Jon Perry_, Nov 10 2014
		

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: this sequence (m=2), A155116 (m=3), A155117 (m=4), A155119 (m=5), A155127 (m=6), A155130 (m=7), A155132 (m=8), A155144 (m=9), A155157 (m=10).
Cf. A028859 (essentially the same sequence). - Klaus Brockhaus, Jul 18 2009
Row sums of A155112.

Programs

  • Magma
    I:=[1,1,3,8]; [n le 4 select I[n] else 2*Self(n-1)+2*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Nov 10 2014
    
  • Maple
    a:= proc(n) option remember; `if`(n=0, 1,
          add(a(n-i)*combinat[fibonacci](1+i), i=1..n))
        end:
    seq(a(n), n=0..42);  # Alois P. Heinz, Feb 11 2021
  • Mathematica
    CoefficientList[Series[(1 -x -x^2)/(1 -2x -2x^2), {x,0,20}], x]
    With[{m=2}, LinearRecurrence[{m, m}, {1, m-1, m^2-1}, 30]] (* G. C. Greubel, Mar 25 2021 *)
  • Maxima
    makelist(sum(binomial(n-k,k)*2^(n-k-1),k,0,floor(n/2)),n,1,12); /* Emanuele Munarini, Feb 04 2014 */
    
  • PARI
    Vec( (1-x-x^2)/(1-2*x-2*x^2) + O(x^66) )  /* Joerg Arndt, Sep 30 2012 */
    
  • Sage
    [1]+[(-1)*(sqrt(2)*i)^(n-2)*chebyshev_U(n, -sqrt(2)*i/2) for n in (1..30)] # G. C. Greubel, Mar 25 2021

Formula

G.f.: (1 - x - x^2)/(1 - 2*x - 2*x^2).
G.f.: 1/( 1 - Sum_{k>=1} (x+x^2)^k ) - 1/( 1 - Sum_{k>=1} F(k+1)*x^k ) where F(k) = A000045(k). - Joerg Arndt, Sep 30 2012
a(n+1) = Sum_{k=0..n} A154929(n,k) = A028859(n).
a(n) = Sum_{k=0..floor(n/2)} ( binomial(n-k,k)*2^(n-k-1) ) for n > 0. - Emanuele Munarini, Feb 04 2014
a(n) = (1/2)*[n=0] - (sqrt(2)*i)^(n-2)*ChebyshevU(n, -sqrt(2)*i/2). - G. C. Greubel, Mar 25 2021
E.g.f.: (3 + exp(x)*(3*cosh(sqrt(3)*x) + sqrt(3)*sinh(sqrt(3)*x)))/6. - Stefano Spezia, Mar 02 2024

A300453 Irregular triangle read by rows: row n consists of the coefficients of the expansion of the polynomial (x + 1)^n + x^2 - 1.

Original entry on oeis.org

0, 0, 1, 0, 1, 1, 0, 2, 2, 0, 3, 4, 1, 0, 4, 7, 4, 1, 0, 5, 11, 10, 5, 1, 0, 6, 16, 20, 15, 6, 1, 0, 7, 22, 35, 35, 21, 7, 1, 0, 8, 29, 56, 70, 56, 28, 8, 1, 0, 9, 37, 84, 126, 126, 84, 36, 9, 1, 0, 10, 46, 120, 210, 252, 210, 120, 45, 10, 1, 0, 11, 56, 165
Offset: 0

Views

Author

Keywords

Comments

This is essentially the usual Pascal triangle A007318, horizontally shifted and with the first three columns altered.
Let P(n;x) = (x + 1)^n + x^2 - 1. Then P(n;x) = P(n-1;x) + x*(x + 1)^(n - 1), with P(0;x) = x^2.
Let a (2,n)-torus knot be projected on the plane. The resulting projection is a planar diagram with n double points. Then, T(n,k) gives the number of state diagrams having k components that are obtained by deleting each double point, then pasting the edges in one of the two ways as shown below.
\ / \_/ \ / \ /
(1) \/ ==> (2) \/ ==> | |
/\ _ /\ | |
/ \ / \ / \ / \
See example for the case n = 2.

Examples

			The triangle T(n,k) begins
n\k  0   1   2    3     4     5     6     7     8     9    10   11  12  13 14
0:   0   0   1
1:   0   1   1
2:   0   2   2
3:   0   3   4    1
4:   0   4   7    4     1
5:   0   5  11   10     5     1
6:   0   6  16   20    15     6     1
7:   0   7  22   35    35    21     7     1
8:   0   8  29   56    70    56    28     8     1
9:   0   9  37   84   126   126    84    36     9     1
10:  0  10  46  120   210   252   210   120    45    10     1
11:  0  11  56  165   330   462   462   330   165    55    11    1
12:  0  12  67  220   495   792   924   792   495   220    66   12   1
13:  0  13  79  286   715  1287  1716  1716  1287   715   286   78  13   1
14:  0  14  92  364  1001  2002  3003  3432  3003  2002  1001  364  91  14  1
...
The states of the (2,2)-torus knot (Hopf Link) are the last four diagrams:
                                    ____  ____
                                   /    \/    \
                                  /     /\     \
                                 |     |  |     |
                                 |     |  |     |
                                  \     \/     /
                                   \____/\____/
                           ___    ____         __________
                         /    \  /    \       /    __    \
                        /     /  \     \     /    /  \    \
                       |      |  |      |   |     |  |     |
                       |      |  |      |   |     |  |     |
                        \      \/      /     \     \/     /
                         \_____/\_____/       \____/\____/
      ____    ____        ____    ____        ____________        __________
     /    \  /    \      /    \  /    \      /     __     \      /    __    \
    /     /  \     \    /     /  \     \    /     /  \     \    /    /  \    \
   |     |    |     |  |     |    |     |  |     |    |     |  |    |    |    |
   |     |    |     |  |     |    |     |  |     |    |     |  |    |    |    |
    \     \  /     /    \     \__/     /    \     \  /     /    \    \__/    /
     \____/  \____/      \____________/      \____/  \____/      \__________/
There are 2 diagrams that consist of two components, and 2 diagrams that consist of one component.
		

References

  • Colin Adams, The Knot Book, W. H. Freeman and Company, 1994.
  • Louis H. Kauffman, Knots and Physics, World Scientific Publishers, 1991.

Crossrefs

Row sums: A000079 (powers of 2).
Triangles related to the regular projection of some knots: A299989 (connected summed trefoils); A300184 (chain links); A300454 (twist knot).
When n = 3 (trefoil), the corresponding 4-tuplet (0,3,4,1) appears in several triangles: A030528 (row 5), A256130 (row 3), A128908 (row 3), A186084 (row 6), A284938 (row 7), A101603 (row 3), A155112 (row 3), A257566 (row 3).

Programs

  • Mathematica
    f[n_] := CoefficientList[ Expand[(x + 1)^n + x^2 - 1], x]; Array[f, 12, 0] // Flatten (* or *)
    CoefficientList[ CoefficientList[ Series[(x^2 + y*x/(1 - y*(x + 1)))/(1 - y), {y, 0, 11}, {x, 0, 11}], y], x] // Flatten (* Robert G. Wilson v, Mar 08 2018 *)
  • Maxima
    P(n, x) := (x + 1)^n + x^2 - 1$
    T : []$
    for i:0 thru 20 do
      T : append(T, makelist(ratcoef(P(i, x), x, n), n, 0, max(2, i)))$
    T;
    
  • PARI
    row(n) = Vecrev((x + 1)^n + x^2 - 1);
    tabl(nn) = for (n=0, nn, print(row(n))); \\ Michel Marcus, Mar 12 2018

Formula

T(n,1) = A001477(n).
T(n,2) = A152947(n).
T(n,k) = A007318(n,k-1), k >= 1.
T(n,0) = 0, T(0,1) = 1, T(0,2) = 1 and T(n,k) = T(n-1,k) + A007318(n-1,k-1).
G.f.: (x^2 + y*x/(1 - y*(x + 1)))/(1 - y).

A155000 a(n) = 8*a(n-1) + 56*a(n-2), n > 2; a(0)=1, a(1)=1, a(2)=15.

Original entry on oeis.org

1, 1, 15, 176, 2248, 27840, 348608, 4347904, 54305280, 677924864, 8464494592, 105679749120, 1319449690112, 16473663471616, 205678490419200, 2567953077764096, 32061620085587968, 400298333039493120
Offset: 0

Views

Author

Philippe Deléham, Jan 18 2009

Keywords

Comments

The sequences A155001, A155000, A154999, A154997 and A154996 have a common form: a(0)=a(1)=1, a(2)= 2*b+1, a(n) = (b+1)*(a(n-1) + b*a(n-2)), with b some constant. The generating function of these is (1 - b*x - b^2*x^2)/(1 - (b+1)*x - b*(1+b)*x^2). - R. J. Mathar, Jan 20 2009

Crossrefs

Programs

  • Magma
    I:=[1,15]; [1] cat [n le 2 select I[n] else 8*(Self(n-1) +7*Self(n-2)): n in [1..30]]; // G. C. Greubel, Apr 20 2021
    
  • Maple
    m:=30; S:=series( (1-7*x-49*x^2)/(1-8*x-56*x^2), x, m+1):
    seq(coeff(S, x, j), j=0..m); # G. C. Greubel, Apr 20 2021
  • Mathematica
    Join[{1},LinearRecurrence[{8,56},{1,15},20]] (* Harvey P. Dale, Dec 11 2012 *)
  • Sage
    def A155000_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-7*x-49*x^2)/(1-8*x-56*x^2) ).list()
    A155000_list(30) # G. C. Greubel, Apr 20 2021

Formula

a(n) = Sum_{k=0..n} A155112(n,k)*7^(n-k). - Philippe Deléham, Jan 27 2009
G.f.: 1 + x*(1+7*x)/(1-8*x-56*x^2). - Harvey P. Dale, Dec 11 2012

Extensions

More terms from Philippe Deléham, Jan 27 2009

A262910 a(n) = Sum_{k=0..n} binomial(k+n-1,k)*binomial(k+n,2*k).

Original entry on oeis.org

1, 2, 10, 59, 366, 2337, 15205, 100235, 667222, 4474733, 30188335, 204646532, 1392850785, 9511878729, 65144238981, 447263887479, 3077459618886, 21215286546705, 146500755609415, 1013180180867125, 7016536189029551, 48650933146617728, 337709155342663620
Offset: 0

Views

Author

Vladimir Kruchinin, Oct 04 2015

Keywords

Crossrefs

Programs

  • Maple
    a := n -> hypergeom([-n, n, n+1], [1/2, 1], -1/4):
    seq(round(evalf(a(n), 32)), n=0..21); # Peter Luschny, Oct 08 2015
  • Mathematica
    Table[Sum[Binomial[k+n-1,k]*Binomial[k+n,2*k], {k,0,n}], {n,0,20}] (* Vaclav Kotesovec, Oct 04 2015 *)
  • Maxima
    B(x):=sum(sum(binomial(i+n-1,i)*binomial(i+n,2*i+1),i,0,n-1)/n*x^n,n,1,30);
    taylor(x*diff(B(x),x)/B(x),x,0,20);
    
  • PARI
    a(n) = sum(k=0, n, binomial(k+n-1,k)*binomial(k+n,2*k));
    vector(50, n, a(n-1)) \\ Altug Alkan, Oct 04 2015

Formula

G.f.: A(x) = x*B'(x)/B(x), where B(x)/x is g.f. of A007863.
Recurrence: 5*(n-1)*n*(35*n^2 - 143*n + 138)*a(n) = 2*(n-1)*(630*n^3 - 2889*n^2 + 3746*n - 1200)*a(n-1) - 2*(70*n^4 - 426*n^3 + 811*n^2 - 589*n + 150)*a(n-2) + 2*(n-3)*(2*n - 3)*(35*n^2 - 73*n + 30)*a(n-3). - Vaclav Kotesovec, Oct 04 2015
a(n) = hypergeom([-n, n, n+1], [1/2, 1], -1/4). - Peter Luschny, Oct 08 2015
a(n) = A155112(2n,n). - Alois P. Heinz, Sep 29 2022

A291385 a(n) = (1/4)*A073388(n+1).

Original entry on oeis.org

1, 4, 14, 47, 152, 480, 1488, 4548, 13744, 41152, 122272, 360944, 1059584, 3095552, 9005568, 26101824, 75404544, 217191424, 623928832, 1788071680, 5113137152, 14592352256, 41569120256, 118219097088, 335685021696, 951817715712, 2695241605120, 7622609858560
Offset: 0

Views

Author

Clark Kimberling, Sep 04 2017

Keywords

Crossrefs

Programs

  • Mathematica
    z = 60; s = x + x^2; p = (1 - 2 s)^2;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1]  (* A019590 *)
    u = Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1]  (* A073388 *)
    u / 2  (* A291385 *)
    LinearRecurrence[{4,0,-8,-4},{1,4,14,47},30] (* Harvey P. Dale, Aug 24 2022 *)

Formula

G.f.: -(((1 + x) (-1 + x + x^2))/(-1 + 2 x + 2 x^2)^2).
a(n) = 4*a(n-1) - 8*a(n-3) + 4*a(n-4) for n >= 5.
a(n) = Sum_{k=0..n+1} k * A155112(n+1,k). - Alois P. Heinz, Sep 29 2022

A292399 p-INVERT of (1,2,3,5,8,...) (distinct Fibonacci numbers), where p(S) = (1 - S)^2.

Original entry on oeis.org

2, 7, 22, 69, 212, 644, 1936, 5772, 17088, 50288, 147232, 429136, 1245888, 3604544, 10396160, 29900992, 85784064, 245548800, 701402624, 1999734016, 5691409408, 16172221440, 45885403136, 130011401216, 367902195712, 1039836672000, 2935713865728, 8279592292352
Offset: 0

Views

Author

Clark Kimberling, Sep 30 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2), ...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).

Crossrefs

Programs

  • Mathematica
    z = 60; s = x (x + 1)/(1 - x - x^2); p = (1 - s)^2;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1]  (* A000045 *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x], 1]  (* A292399 *)

Formula

G.f.: -(((1 + x) (-2 + 3 x + 3 x^2))/(-1 + 2 x + 2 x^2)^2).
a(n) = 4*a(n-1) - 8*a(n-3) - 4*a(n-4) for n >= 5.
a(n) = Sum_{k=0..n+1} (k+1) * A155112(n+1,k). - Alois P. Heinz, Sep 29 2022

A370173 Riordan array (1-x-x^2, x*(1+x)).

Original entry on oeis.org

1, -1, 1, -1, 0, 1, 0, -2, 1, 1, 0, -1, -2, 2, 1, 0, 0, -3, -1, 3, 1, 0, 0, -1, -5, 1, 4, 1, 0, 0, 0, -4, -6, 4, 5, 1, 0, 0, 0, -1, -9, -5, 8, 6, 1, 0, 0, 0, 0, -5, -15, -1, 13, 7, 1, 0, 0, 0, 0, -1, -14, -20, 7, 19, 8, 1, 0, 0, 0, 0, 0, -6, -29, -21, 20, 26, 9, 1
Offset: 0

Views

Author

Philippe Deléham, Feb 27 2024

Keywords

Comments

Triangle T(n,k) read by rows : matrix product of A155112*A130595.
Triangle T(n,k), read by rows, given by [-1, 2, -1/2, -1/2, 0, 0, 0, 0, 0, ...] DELTA [1, 0, 0, 0, 0, 0, 0, 0, 0, ...] where DELTA is the operator defined in A084938.

Examples

			Triangle T(n,k) begins:
  1;
 -1,  1;
 -1,  0,  1;
  0, -2,  1,  1;
  0, -1, -2,  2, 1;
  0,  0, -3, -1, 3, 1;
...
		

Crossrefs

Programs

  • Python
    from functools import cache
    @cache
    def T(n, k):
        if k > n: return 0
        if n == 0: return 1
        if k == 0: return -1 if n == 1 or n == 2 else 0
        return T(n-1, k-1) + T(n-2, k-1)
    for n in range(9):
        print([T(n, k) for k in range(n+1)])  # Peter Luschny, Feb 28 2024

Formula

T(n,k) = T(n-1,k-1) + T(n-2,k-1), T(0,0) = 1, T(1,0) = T(2,0) = -1, T(n,0) = 0 for n>2, T(n,k) = 0 if k>n.
T(n,k) = Sum_{j = k..n} A155112(n,j)*A130595(j,k).
Sum_{k=0..n} T(n,k)*x^k = A000007(n), A155020(n), A155116(n), A155117(n), A155119(n), A155127(n), A155130(n), A155132(n), A155144(n), A155157(n) for x = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 respectively.
Showing 1-7 of 7 results.