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

A164948 Fibonacci matrix read by antidiagonals. (Inverse of A136158.)

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, 19683, -78732, 137781, -139968, 91854, -40824, 12474, -2592, 351, -28, 1
Offset: 0

Views

Author

Mark Dols, Sep 01 2009

Keywords

Comments

Triangle, read by rows, given by [1,2,0,0,0,0,0,0,0,...] DELTA [-1,0,0,0,0,0,0,0,0,...] where DELTA is the operator defined in A084938. - Philippe Deléham, Sep 02 2009

Examples

			As 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;
		

Crossrefs

Programs

  • Magma
    A164948:= func< n,k | n eq 0 select 1 else (-1)^k*3^(n-k-1)*(n+2*k)*Binomial(n,k)/n >;
    [A164948(n, k): k in [0..n], n in [0..12]]; // G. C. Greubel, Dec 26 2023
    
  • Mathematica
    A164948[n_,k_]:= If[n==0,1,(-1)^k*3^(n-k-1)*(n+2*k)*Binomial[n,k]/n];
    Table[A164948[n,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Dec 26 2023 *)
  • SageMath
    def A164948(n,k): return 1 if (n==0) else (-1)^k*3^(n-k-1)*((n+2*k)/n)*binomial(n, k)
    flatten([[A164948(n, k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Dec 26 2023

Formula

Sum_{k=0..n} T(n, k) = A000007(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A001519(n).
From Philippe Deléham, Oct 09 2011: (Start)
T(n,k) = 3*T(n-1,k) - T(n-1,k-1) with T(0,0)=1, T(1,0)=1, T(1,1)=-1.
Row n: Expansion of (1-x)*(3-x)^(n-1), n>0. (End)
G.f.: (1-2*x)/(1-3*x+x*y). - R. J. Mathar, Aug 12 2015
From G. C. Greubel, Dec 26 2023: (Start)
T(n, k) = (-1)^k * A136158(n, k).
T(n, k) = (-1)^k*3^(n-k-1)*((n+2*k)/n)*binomial(n, k), for n > 0, with T(0, 0) = 1.
T(n, 0) = A133494(n).
T(n, 1) = -A006234(n+2), n >= 1.
T(n, 2) = A080420(n-2), n >= 2.
T(n, 3) = -A080421(n-3), n >= 3.
T(2*n, n) = 4*(-1)^n*A098399(n-1) - (1/3)*[n=0].
T(n, n-4) = 27*(-1)^n*A001296(n-3), n >= 4.
T(n, n-3) = 9*(-1)^(n-1)*A002411(n-2), n >= 3.
T(n, n-2) = 3*(-1)^n*A000326(n-1) = (-1)^n*A062741(n-1), n >= 2.
T(n, n-1) = (-1)^(n-1)*A016777(n-1), n >= 1.
T(n, n) = (-1)^n.
Sum_{k=0..n} (-1)^k*T(n, k) = A081294(n).
Sum_{k=0..n} (-1)^k*T(n-k, k) = A003688(n). (End)

Extensions

More terms from Philippe Deléham, Oct 09 2011

A198392 a(n) = (6*n*(3*n+7)+(2*n+13)*(-1)^n+3)/16 + 1.

Original entry on oeis.org

2, 4, 12, 18, 31, 41, 59, 73, 96, 114, 142, 164, 197, 223, 261, 291, 334, 368, 416, 454, 507, 549, 607, 653, 716, 766, 834, 888, 961, 1019, 1097, 1159, 1242, 1308, 1396, 1466, 1559, 1633, 1731, 1809, 1912, 1994, 2102, 2188, 2301, 2391, 2509, 2603, 2726, 2824, 2952
Offset: 0

Views

Author

Bruno Berselli, Oct 25 2011

Keywords

Comments

For an origin of this sequence, see the triangular spiral illustrated in the Links section.
First bisection gives A117625 (without the initial term).

Crossrefs

Cf. A152832 (by Superseeker).
Cf. sequences related to the triangular spiral: A022266, A022267, A027468, A038764, A045946, A051682, A062708, A062725, A062728, A062741, A064225, A064226, A081266-A081268, A081270-A081272, A081275 [incomplete list].

Programs

  • Magma
    [(6*n*(3*n+7)+(2*n+13)*(-1)^n+3)/16+1: n in [0..50]];
  • Mathematica
    LinearRecurrence[{1,2,-2,-1,1},{2,4,12,18,31},60] (* Harvey P. Dale, Jun 15 2022 *)
  • PARI
    for(n=0, 50, print1((6*n*(3*n+7)+(2*n+13)*(-1)^n+3)/16+1", "));
    

Formula

G.f.: (2+2*x+4*x^2+2*x^3-x^4)/((1+x)^2*(1-x)^3).
a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5).
a(n)-a(-n-1) = A168329(n+1).
a(n)+a(n-1) = A102214(n).
a(2n)-a(2n-1) = A016885(n).
a(2n+1)-a(2n) = A016825(n).

A180568 Triangle read by rows: T(n,k) is the number of unordered pairs of nodes at distance k in the grid P_3 x P_n (1<=k<=n), where P_j denotes the path graph on j nodes.

Original entry on oeis.org

2, 1, 7, 6, 2, 12, 14, 8, 2, 17, 22, 17, 8, 2, 22, 30, 26, 17, 8, 2, 27, 38, 35, 26, 17, 8, 2, 32, 46, 44, 35, 26, 17, 8, 2, 37, 54, 53, 44, 35, 26, 17, 8, 2, 42, 62, 62, 53, 44, 35, 26, 17, 8, 2, 47, 70, 71, 62, 53, 44, 35, 26, 17, 8, 2, 52, 78, 80, 71, 62, 53, 44, 35, 26, 17, 8, 2, 57
Offset: 1

Views

Author

Emeric Deutsch, Sep 28 2010

Keywords

Comments

Row n contains n+1 entries.
Sum of entries in row n = (3/2)n(3n-1)=A062741(n).
The entries in row n are the coefficients of the Wiener polynomial of the grid P_3 x P_n.
Sum(k*T(n,k),k=1..n+1)=(1/2)n(n+3)(3n-1)=A180569(n) = the Wiener index of the grid P_3 x P_n.
The average of all distances in the grid P_3 x P_n is (n+3)/3.

Examples

			T(1,1)=2, T(1,2)=1 because in P_3 x P_1 = P_3 there are 2 pairs of nodes at distance 1 and one pair at distance 2.
Triangle starts:
2,1;
7,6,2;
12,14,8,2;
17,22,17,8,2;
		

Crossrefs

Programs

  • Maple
    p := proc (n) options operator, arrow: (t^(n+1)*(3+4*t+2*t^2)+(5*n-3)*t-(2*n+4)*t^2-(2*n+2)*t^3-n*t^4)/(1-t)^2 end proc: for n to 12 do f[n] := sort(expand(simplify(p(n)))) end do: for n to 12 do seq(coeff(f[n], t, k), k = 1 .. n+1) end do; # yields sequence in triangular form

Formula

The row generating polynomials p(n)=p(n,t) satisfy the recurrence relation p(n)=p(n-1)=2t+t^2+t(3+4t+2t^2)*sum(t^j,j=0..n-2) (these are the Wiener polynomials of the corresponding graphs).
The generating polynomial of row n is p(n; t)=[t^{n+1}*(3+4t+2t^2)+(5n-3)t-2(n+2)t^2-2(n+1)t^3-nt^4]/(1-t)^2.
G.f. = G(t,z)=Sum(T(n,k)*t^k*z^n, k>=1, n>=1) = tz(zt^2+2tz+t+3z+2)/[(1-tz)(1-z)^2].

A180575 Triangle read by rows: T(n,k) is the number of unordered pairs of nodes at distance k in the prism graph C_n X P_3 with the edges of the outer cycle removed (called a web graph). Equivalently, the graph is obtained by attaching a pendant edge to each node of the outer cycle of the circular ladder (prism) C_n X P_2. C_n denotes the cycle graph on n nodes and P_n denotes the path graph on n nodes.

Original entry on oeis.org

12, 15, 9, 16, 24, 20, 6, 20, 35, 35, 15, 24, 42, 48, 30, 9, 28, 49, 63, 49, 21, 32, 56, 72, 64, 40, 12, 36, 63, 81, 81, 63, 27, 40, 70, 90, 90, 80, 50, 15, 44, 77, 99, 99, 99, 77, 33, 48, 84, 108, 108, 108, 96, 60, 18, 52, 91, 117, 117, 117, 117, 91, 39, 56, 98, 126, 126
Offset: 3

Views

Author

Emeric Deutsch, Sep 19 2010

Keywords

Comments

The entries in row n are the coefficients of the Wiener polynomial of the graph.
Number of entries in row n is 2+floor(n/2).
The entries in row n are the coefficients of the Wiener polynomial of the corresponding graph.
Sum of entries in row n is 3n(3n-1)/2 = A062741.
Sum_{k>=1} k*T(n,k) = A180576(n) = the Wiener index of the corresponding graph.

Examples

			The triangle starts:
  12,15,9;
  16,24,20,6;
  20,35,35,15;
  24,42,48,30,9;
		

Crossrefs

Programs

  • Maple
    P := proc (n) if `mod`(n, 2) = 1 then sort(expand(simplify(n*(4*t+3*t^2+2*t^3-2*t^((1/2)*n+1/2)-4*t^((1/2)*n+3/2)-3*t^((1/2)*n+5/2))/(1-t)))) else sort(expand(simplify((1/2)*n*(8*t+6*t^2+4*t^3-2*t^((1/2)*n)-6*t^((1/2)*n+1)-7*t^((1/2)*n+2)-3*t^((1/2)*n+3))/(1-t)))) end if end proc: for n from 3 to 14 do seq(coeff(P(n), t, j), j = 1 .. 2+floor((1/2)*n)) end do; # yields sequence in triangular form

Formula

The generating polynomial of row 2*n+1 (which is also the Wiener polynomial of the corresponding graph) is (2*n+1)*(4*t+3*t^2+2*t^3-2*t^(n+1)-4*t^(n+2)-3*t^(n+3))/(1-t).
The generating polynomial of row 2*n (which is also the Wiener polynomial of the corresponding graph) is n*(8*t+6*t^2+4*t^3-2*t^n-6*t^(n+1)-7*t^(n+2)-3*t^(n+3))/(1-t).

A192024 Triangle read by rows: T(n,k) is the number of unordered pairs of nodes at distance k in the double-comb graph \/\/\/...\/_\/ with 3n (n>=1) nodes. The entries in row n are the coefficients of the corresponding Wiener polynomial.

Original entry on oeis.org

2, 1, 5, 6, 4, 8, 12, 12, 4, 11, 18, 21, 12, 4, 14, 24, 30, 21, 12, 4, 17, 30, 39, 30, 21, 12, 4, 20, 36, 48, 39, 30, 21, 12, 4, 23, 42, 57, 48, 39, 30, 21, 12, 4, 26, 48, 66, 57, 48, 39, 30, 21, 12, 4, 29, 54, 75, 66, 57, 48, 39, 30, 21, 12, 4, 32, 60, 84, 75, 66, 57, 48, 39, 30, 21, 12, 4
Offset: 1

Views

Author

Emeric Deutsch, Jun 25 2011

Keywords

Comments

Row n contains n+1 entries.
Sum of entries in row n is 3*n*(3*n-1)/2=A062741(n).
Sum(k*T(n,k),k>=1)=A192025(n) (the Wiener indices).

Examples

			T(2,1)=5, T(2,2)=6, T(2,3)=4 because in the graph \/_\/ there are 5 pairs of nodes at distance 1, 6 pairs at distance 2, and 4 pairs at distance 3.
Triangle starts:
2,1;
5,6,4;
8,12,12,4;
11,18,21,12,4;
		

Crossrefs

Programs

  • Maple
    Q := proc (n) options operator, arrow: n*(t^2+2*t)+t*(1+2*t)^2*(sum((n-j)*t^(j-1), j = 1 .. n-1)) end proc: for n to 11 do P[n] := sort(expand(Q(n))) end do: for n to 11 do seq(coeff(P[n], t, j), j = 1 .. n+1) end do; # yields sequence in triangular form

Formula

G.f.: G(t,z)=t*z*(2+t+z+2*t*z+3*t^2*z)/((1-t*z)*(1-z)^2).
G.f. of column 1: z*(2+z)/(1-z)^2.
G.f. of column 2: z*(1+4*z+z^2)/(1-z)^2.
G.f. of column k>=3: z^(k-1)*(4+4*z+z^2)/(1-z)^2.
The generating polynomial of row n (i.e. the Wiener polynomial of the double-comb with 3n nodes) is n*(2*t +t^2)+t*(1+2*t)^2*(n*(1-t)-(1-t^n))/(1-t)^2 or, equivalently, n*(2*t+t^2)+t*(1+2*t)^2*Sum((n-j)*t^(j-1), j=1..n-1).

A253672 Another fractal t(h)ree.

Original entry on oeis.org

0, 1, 2, 0, 1, 3, 4, 5, 2, 0, 1, 3, 4, 6, 7, 8, 5, 2, 0, 1, 3, 4, 6, 7, 9, 10, 11, 8, 5, 2, 0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 14, 11, 8, 5, 2, 0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 17, 14, 11, 8, 5, 2, 0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 18, 19, 20
Offset: 0

Views

Author

Keywords

Comments

A008585(n+1) = length of row n; A062741(n+1) = sum of row n;
the fractal nature is illustrated by the following manipulation: remove from all rows the first two terms and also the last one, after subtracting all terms by 3, the original t(h)ree will reappear.

Examples

			.  0:                                     | 0  1  2|
.  1:                                0  1 | 3  4  5|  2
.  2:                          0  1  3  4 | 6  7  8|  5  2
.  3:                    0  1  3  4  6  7 | 9 10 11|  8  5  2
.  4:              0  1  3  4  6  7  9 10 |12 13 14| 11  8  5  2
.  5:          0 1 3  4  6  7  9 10 12 13 |15 16 17| 14 11  8  5 2
.  6:      0 1 3 4 6  7  9 10 12 13 15 16 |18 19 20| 17 14 11  8 5 2
.  7:  0 1 3 4 6 7 9 10 12 13 15 16 18 19 |21 22 23| 20 17 14 11 8 5 2 .
		

Crossrefs

Programs

  • Haskell
    a253672 n k = a253672_tabf !! n !! k
    a253672_row n = a253672_tabf !! n
    a253672_tabf = [0,1,2] : f [] [0,1,2] [] (iterate (map (+ 3)) [3..5]) where
       f as bs cs (uvws:uvwss) = (as' ++ uvws ++ cs') : f as' uvws cs' uvwss
         where as' = as ++ [u,v]; cs' = [w] ++ cs
               [u,v,w] = bs
    a253672_list = concat a253672_tabf

Formula

T(n,0) = 0; T(n,1)=1; T(n,2*n-1) = 2; T(n+1,k+2) = T(n,k)+3, k = 0..3*n-1.

A236311 Riordan array ((1-x)/(1-3*x+3*x^2), x/(1-3*x+3*x^2)).

Original entry on oeis.org

1, 2, 1, 3, 5, 1, 3, 15, 8, 1, 0, 33, 36, 11, 1, -9, 54, 117, 66, 14, 1, -27, 54, 297, 282, 105, 17, 1, -54, -27, 594, 945, 555, 153, 20, 1, -81, -297, 864, 2583, 2295, 963, 210, 23, 1, -81, -891, 513, 5778, 7803, 4725, 1533, 276, 26, 1, 0, -1863, -1944, 10098
Offset: 0

Views

Author

Philippe Deléham, Jan 21 2014

Keywords

Comments

Row sums are 3^n = A000244(n).
Diagonals sums are 2^n = A000079(n).
T(n,n) = A000012(n).
T(n+1,n) = A016789(n).
T(n+2,n) = A062741(n+1).
T(n+3,n) = 3*A004188(n+1).
T(n,0) = A057682(n+1).

Examples

			Triangle begins :
1;
2, 1;
3, 5, 1;
3, 15, 8, 1;
0, 33, 36, 11, 1;
-9, 54, 117, 66, 14, 1;
-27, 54, 297, 282, 105, 17, 1;
		

Crossrefs

Formula

T(n,k) = 3*T(n-1,k) + T(n-1,k-1) -3*T(n-2,k), T(0,0) = T(1,1) = 1, T(1,0) = 2, T(n,k) = 0 if k<0 or if k>n.
Previous Showing 21-27 of 27 results.