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

A186505 Antidiagonal sums of triangle A186084.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 1, 2, 2, 3, 4, 5, 8, 9, 14, 18, 25, 34, 46, 64, 86, 119, 162, 222, 304, 416, 571, 780, 1071, 1466, 2010, 2754, 3775, 5175, 7092, 9724, 13329, 18274, 25052, 34347, 47091, 64562, 88522, 121369, 166411, 228168, 312848, 428959, 588163
Offset: 0

Views

Author

Paul D. Hanna, Feb 23 2011

Keywords

Comments

Triangle A186084 is the number of 1-dimensional sandpiles with n grains and base length k.
The g.f. T(x,y) of triangle A186084 satisfies: T(x,y) = 1/(1 - x*y - x^3*y^2*T(x,x*y)); therefore, the g.f. of this sequence is T(x,x).

Examples

			G.f.: 1 + x^2 + x^4 + x^5 + x^6 + 2*x^7 + 2*x^8 + 3*x^9 + 4*x^10 +...
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, `if`(i=1, 1, 0),
          `if`(n<0 or i<1, 0, expand(x*add(b(n-i, i+j), j=-1..1)) ))
        end:
    a:= n-> add(coeff(b(n-k, 1), x, k), k=0..n):
    seq(a(n), n=0..70);  # Alois P. Heinz, Jul 24 2013
  • Mathematica
    m = 100;
    f[i_] := If[i == 0, 1, -x^(2i+3)];
    g[i_] := 1 - x^(i+2);
    ContinuedFractionK[f[i], g[i], {i, 0, Sqrt[m] // Ceiling}] + O[x]^m // CoefficientList[#, x]& (* Jean-François Alcover, Oct 14 2019, after Sergei N. Gladkovskii *)
  • PARI
    {a(n)=local(Txy=1+x*y); for(i=1, n, Txy=1/(1-x*y-x^3*y^2*subst(Txy, y, x*y+x*O(x^n)))); polcoeff(subst(Txy,y,x), n, x)}
    
  • PARI
    N = 66; x = 'x + O('x^N);
    Q(k) = if(k>N, 1, 1/x^(k+1) - 1 - 1/Q(k+1) );
    gf = 1/x^3 - (Q(0) + 1)/x^2;
    Vec(gf) \\ Joerg Arndt, May 07 2013

Formula

G.f.: (1 - x/(1 - 1/B(x)))/x^3 where B(x) equals the g.f. of the row sums of triangle A186084.
G.f.: 1/(1-x^2 - x^5/(1-x^3 - x^7/(1-x^4 - x^9/(1-x^5 - x^11/(1-x^6 - x^13/(1-...)))))) (continued fraction).
G.f.: 1/(1-x^2/(1-x^3/(1-x^7/(1-x^4/(1-x^5/(1-x^11/(1-x^6/(1 -x^7/(1-x^15/(1-...)))))))))) (continued fraction).
G.f.: 1/x^3 - (Q(0) + 1)/x^2, where Q(k)= 1/x^(k+1) - 1 - 1/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 07 2013
a(n) ~ c * d^n, where d = 1.3712018040437285..., c = 0.154355235026898... . - Vaclav Kotesovec, Sep 10 2014

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).

A186085 Number of 1-dimensional sandpiles with n grains.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 5, 8, 13, 22, 36, 60, 100, 166, 277, 461, 769, 1282, 2137, 3565, 5945, 9916, 16540, 27589, 46022, 76769, 128062, 213628, 356366, 594483, 991706, 1654352, 2759777, 4603843, 7680116, 12811951, 21372882, 35654237, 59478406, 99221923, 165522118, 276124217, 460630839
Offset: 0

Views

Author

Joerg Arndt, Feb 12 2011

Keywords

Comments

Number of compositions of n where the first and the last parts are 1 and the absolute difference between consecutive parts is <=1 (smooth compositions).
Such a composition [c1,c2,c3,...] corresponds to a sandpile with c1(=1) grains in the first positions, c2 in the second, and so on. Assuming the critical slope is 1 (for the pile to be stable) we obtain the conditions on the compositions.
With the additional requirement of unimodality one gets A001522. [Joerg Arndt, Dec 09 2012]
Dropping the requirement that the first and last parts are 1 gives A034297. Restriction to weakly increasing (or decreasing) sums gives A034296. [Joerg Arndt, Jun 02 2013]
Also the number of compositions of n with first part 1, up-steps of at most 1, and no two consecutive up-steps. The sandpiles are recovered by shifting the rows above the bottom row to the left by one position relative to the next lower row. [Joerg Arndt, Mar 30 2014]
Also fountains of coins (cf. A005169) with no consecutive up-steps. Shift the top rows in the previous comment by half a position. [Joerg Arndt, Mar 30 2014]

Examples

			The a(7)=8 smooth compositions of 7 are:
:   1:      [ 1 1 1 1 1 1 1 ]  (composition)
:
: ooooooo  (rendering of sandpile)
:
:   2:      [ 1 1 1 1 2 1 ]
:
:     o
: oooooo
:
:   3:      [ 1 1 1 2 1 1 ]
:
:    o
: oooooo
:
:   4:      [ 1 1 2 1 1 1 ]
:
:   o
: oooooo
:
:   5:      [ 1 1 2 2 1 ]
:
:   oo
: ooooo
:
:   6:      [ 1 2 1 1 1 1 ]
:
:  o
: oooooo
:
:   7:      [ 1 2 1 2 1 ]
:
:  o o
: ooooo
:
:   8:      [ 1 2 2 1 1 ]
:
:  oo
: ooooo
		

Crossrefs

Cf. A186084 (sandpiles by base length).
Cf. A005169 (compositions of n with c(1)=1 and c(i+1)<=c(i)+1).
Cf. A186505 (antidiagonal sums of triangle A186084).
Cf. A129181.

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, `if`(i=1, 1, 0),
          `if`(n<0 or i<1, 0, add(b(n-i, i+j), j=-1..1)))
        end:
    a:= n-> `if`(n=0, 1, b(n-1, 1)):
    seq(a(n), n=0..50);  # Alois P. Heinz, Jun 11 2013
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, If[i == 1, 1, 0], If[n<0 || i<1, 0, Sum[b[n-i, i+j], {j, -1, 1}]]]; a[n_] := If[n == 0, 1, b[n-1, 1]]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Feb 03 2014, after Alois P. Heinz *)
  • PARI
    {a(n)=local(Txy=1+x*y); for(i=1, n, Txy=1/(1-x*y-x^3*y^2*subst(Txy, y, x*y+x*O(x^n)))); polcoeff(subst(1+x*Txy, y, 1), n, x)} /* Paul D. Hanna */
    
  • PARI
    /* continued fraction for terms up to 460630839: */
    Vec(1/ (1-x/ (1-x^3/ (1-x^2/ (1-x^3/ (1-x^7/ (1-x^4/ (1-x^5/ (1-x^11/ (1-x^6/(1-x*O(x^0) ))))))))))) /* Paul D. Hanna */
    
  • PARI
    N = 66; x = 'x + O('x^N);
    Q(k) = if(k>N, 1, 1/x^(k+1) - 1 - 1/Q(k+1) );
    gf = 1 + 1/Q(0);
    Vec(gf) /* Joerg Arndt, May 07 2013 */

Formula

G.f.: 1 + x/(1-x - x^3*B(x)) where B(x) equals the g.f. of the antidiagonal sums of triangle A186084 [Paul D. Hanna].
G.f.: 1 + x/(1-x - x^3/(1-x^2 - x^5/(1-x^3 - x^7/(1-x^4 - x^9/(1 -...))))) (continued fraction). [Paul D. Hanna].
G.f.: 1/(1 - x/(1-x^3/(1-x^2/(1 - x^3/(1-x^7/(1-x^4/(1 - x^5/(1-x^11/(1-x^6/(1 -...)))))))))) (continued fraction). [Paul D. Hanna].
The g.f. T(x,y) of triangle A186084 satisfies: T(x,y) = 1/(1 - x*y - x^3*y^2*T(x,x*y)); therefore, the g.f. of this sequence is A(x) = 1 + x*T(x,1). [Paul D. Hanna]
a(n) ~ c/r^n where r = 0.5994477646147968266874606710272382... and c = 0.213259838728143595595398989847345... [Paul D. Hanna]
G.f.: 1 + 1/Q(0), where Q(k)= 1/x^(k+1) - 1 - 1/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, May 07 2013
G.f.: G(1), where G(k) = 1 + x^k/( 1 - x^k * G(k+1) ) (continued fraction). [Joerg Arndt, Jun 29 2013]
a(n) = Sum_{j=1..n} A129181(n-j,j-1) for n>=1. - Alois P. Heinz, Jun 25 2023

A196008 Positive integers a for which there is a (-5/3)-Pythagorean triple (a,b,c) satisfying a<=b.

Original entry on oeis.org

3, 5, 6, 7, 8, 8, 9, 9, 10, 11, 12, 13, 14, 15, 15, 15, 16, 16, 17, 18, 18, 19, 20, 21, 21, 21, 22, 24, 24, 24, 25, 25, 26, 27, 27, 27, 27, 28, 30, 30, 30, 31, 32, 32, 32, 33, 33, 35, 35, 35, 35, 36, 36, 37, 38, 39, 39, 40, 40, 40, 40, 42, 42, 42, 43, 45, 45, 45, 45
Offset: 1

Views

Author

Clark Kimberling, Sep 27 2011

Keywords

Comments

See A195770 for definitions of k-Pythagorean triple, primitive k-Pythagorean triple, and lists of related sequences.

Crossrefs

Programs

  • Mathematica
    z8 = 400; z9 = 150; z7 = 100;
    k = -5/3; c[a_, b_] := Sqrt[a^2 + b^2 + k*a*b];
    d[a_, b_] := If[IntegerQ[c[a, b]], {a, b, c[a, b]}, 0]
    t[a_] := Table[d[a, b], {b, a, z8}]
    u[n_] := Delete[t[n], Position[t[n], 0]]
    Table[u[n], {n, 1, 15}]
    t = Table[u[n], {n, 1, z8}];
    Flatten[Position[t, {}]]
    u = Flatten[Delete[t, Position[t, {}]]];
    x[n_] := u[[3 n - 2]];
    Table[x[n], {n, 1, z7}]   (* A196008 *)
    y[n_] := u[[3 n - 1]];
    Table[y[n], {n, 1, z7}]   (* A196009 *)
    z[n_] := u[[3 n]];
    Table[z[n], {n, 1, z7}]   (* A196083 *)
    x1[n_] := If[GCD[x[n], y[n], z[n]] == 1, x[n], 0]
    y1[n_] := If[GCD[x[n], y[n], z[n]] == 1, y[n], 0]
    z1[n_] := If[GCD[x[n], y[n], z[n]] == 1, z[n], 0]
    f = Table[x1[n], {n, 1, z9}];   (* A196084 *)
    x2 = Delete[f, Position[f, 0]]
    g = Table[y1[n], {n, 1, z9}];   (* A196085 *)
    y2 = Delete[g, Position[g, 0]]
    h = Table[z1[n], {n, 1, z9}];   (* A196086 *)
    z2 = Delete[h, Position[h, 0]]

A187081 Triangle T(n,k) read by rows: sandpiles of n grains and height k.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 2, 0, 0, 0, 0, 1, 4, 0, 0, 0, 0, 0, 1, 7, 0, 0, 0, 0, 0, 0, 1, 12, 0, 0, 0, 0, 0, 0, 0, 1, 20, 1, 0, 0, 0, 0, 0, 0, 0, 1, 33, 2, 0, 0, 0, 0, 0, 0, 0, 0, 1, 54, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 88, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 143, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 232, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 376, 84, 0, 0
Offset: 0

Views

Author

Joerg Arndt, Mar 08 2011

Keywords

Comments

See A186085 for the definition of sandpiles.

Examples

			Triangle begins:
1;
0,1;
0,1,0;
0,1,0,0;
0,1,1,0,0;
0,1,2,0,0,0;
0,1,4,0,0,0,0;
0,1,7,0,0,0,0,0;
0,1,12,0,0,0,0,0,0;
0,1,20,1,0,0,0,0,0,0;
0,1,33,2,0,0,0,0,0,0,0;
0,1,54,5,0,0,0,0,0,0,0,0;
0,1,88,11,0,0,0,0,0,0,0,0,0;
0,1,143,22,0,0,0,0,0,0,0,0,0,0;
0,1,232,44,0,0,0,0,0,0,0,0,0,0,0;
0,1,376,84,0,0,0,0,0,0,0,0,0,0,0,0;
0,1,609,158,1,0,0,0,0,0,0,0,0,0,0,0,0;
0,1,986,293,2,0,0,0,0,0,0,0,0,0,0,0,0,0;
0,1,1596,535,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
0,1,2583,969,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
0,1,4180,1739,25,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
0,1,6764,3099,52,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
0,1,10945,5491,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0;
The 22 compositions corresponding to sandpiles of 9 grains are the following:
    #:    composition              height
    1:    [ 1 2 3 2 1 ]              3
    2:    [ 1 2 2 2 1 1 ]            2
    3:    [ 1 2 2 1 2 1 ]            2
    4:    [ 1 2 1 2 2 1 ]            2
    5:    [ 1 1 2 2 2 1 ]            2
    6:    [ 1 2 2 1 1 1 1 ]          2
    7:    [ 1 2 1 2 1 1 1 ]          2
    8:    [ 1 1 2 2 1 1 1 ]          2
    9:    [ 1 2 1 1 2 1 1 ]          2
   10:    [ 1 1 2 1 2 1 1 ]          2
   11:    [ 1 1 1 2 2 1 1 ]          2
   12:    [ 1 2 1 1 1 2 1 ]          2
   13:    [ 1 1 2 1 1 2 1 ]          2
   14:    [ 1 1 1 2 1 2 1 ]          2
   15:    [ 1 1 1 1 2 2 1 ]          2
   16:    [ 1 2 1 1 1 1 1 1 ]        2
   17:    [ 1 1 2 1 1 1 1 1 ]        2
   18:    [ 1 1 1 2 1 1 1 1 ]        2
   19:    [ 1 1 1 1 2 1 1 1 ]        2
   20:    [ 1 1 1 1 1 2 1 1 ]        2
   21:    [ 1 1 1 1 1 1 2 1 ]        2
   22:    [ 1 1 1 1 1 1 1 1 1 ]      1
  stats:  0 1 20 1 0 0 0 0 0 0
		

Crossrefs

Row sums are A186085 (sandpiles of n grains), cf. A186084 (sandpiles by base length), A047998 (fountains of coins by base length).

Formula

For n>=2 we have T(n,1)+T(n,2) = Fibonacci(n-1).
T(n,2) = A000071(n). [Joerg Arndt, Sep 17 2013]
Showing 1-5 of 5 results.