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.

A054878 Number of closed walks of length n along the edges of a tetrahedron based at a vertex.

Original entry on oeis.org

1, 0, 3, 6, 21, 60, 183, 546, 1641, 4920, 14763, 44286, 132861, 398580, 1195743, 3587226, 10761681, 32285040, 96855123, 290565366, 871696101, 2615088300, 7845264903, 23535794706, 70607384121, 211822152360, 635466457083
Offset: 0

Views

Author

Paolo Dominici (pl.dm(AT)libero.it), May 23 2000

Keywords

Comments

Number of closed walks of length n at a vertex of C_4, the cyclic graph on 4 nodes. 3*A015518(n) + a(n) = 3^n. - Paul Barry, Feb 03 2004
Form the digraph with matrix A = [0,1,1,1; 1,0,1,1; 1,1,0,1; 1,0,1,1]; a(n) corresponds to the (1,1) term of A^n. - Paul Barry, Oct 02 2004
Absolute values of A084567 (compare generating functions).
For n > 1, 4*a(n)=A218034(n)= the trace of the n-th power of the adjacency matrix for a complete 4-graph, a 4 X 4 matrix with a null diagonal and all ones for off-diagonal elements. The diagonal elements for the n-th power are a(n) and the off-diagonal are a(n)+1 for an odd power and a(n)-1 for an even (cf. A001045). - Tom Copeland, Nov 06 2012

Crossrefs

Row n=4 of A109502. A084567 (signed version).
{a(n)/3} for n>0 is A015518, non-closed walks.
Cf. A001045, A078008, A097073, A115341, A015518 (sequences where a(n)=3^n-a(n-1)). - Vladimir Joseph Stephan Orlovsky, Dec 11 2008

Programs

  • Magma
    [(3^n+(-1)^n*3)/4: n in [0..35]]; // Vincenzo Librandi, Jun 30 2011
    
  • Maple
    A054878:=n->(3^n + (-1)^n*3)/4: seq(A054878(n), n=0..50); # Wesley Ivan Hurt, Sep 16 2017
  • Mathematica
    Table[(3^n + (-1)^n*3)/4, {n, 0, 26}] (* or *)
    CoefficientList[Series[1/4*(3/(1 + x) + 1/(1 - 3 x)), {x, 0, 26}], x] (* Michael De Vlieger, Sep 15 2017 *)
  • PARI
    a(n) = (3^n + 3*(-1)^n)/4; \\ Altug Alkan, Sep 17 2017

Formula

a(n) = (3^n + (-1)^n*3)/4.
G.f.: 1/4*(3/(1+x) + 1/(1-3*x)).
E.g.f.: (exp(3*x) + 3*exp(-x))/4. - Paul Barry, Apr 20 2003
a(n) = 3^n - a(n-1) with a(0)=0. - Labos Elemer, Apr 26 2003
G.f.: (1 - 3*x^2 - 2*x^3)/(1 - 6*x^2 - 8*x^3 - 3*x^4) = (1 - 3*x^2 - 2*x^3)/charpoly(adj(C_4)). - Paul Barry, Feb 03 2004
From Paul Barry, Oct 02 2004: (Start)
G.f.: (1-2*x)/(1 - 2*x - 3*x^2).
a(n) = 2*a(n-1) + 3*a(n-2). (End)
G.f.: 1 - x + x/Q(0), where Q(k) = 1 + 3*x^2 - (3*k+4)*x + x*(3*k+1 - 3*x)/Q(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 07 2013
a(n+m) = a(n)*a(m) + a(n+1)*a(m+1)/3. - Yuchun Ji, Sep 12 2017
a(n) = 3*a(n-1) + 3*(-1)^n. - Yuchun Ji, Sep 13 2017
From Peter Bala, May 28 2024: (Start)
a(n) = (-1)^n + Sum_{k = 1..n} (-1)^(n-k)*binomial(n, k)*4^(k-1).
G.f.: A(x) = 1/(1 - x^2) o 1/(1 - x^2), where o denotes the black diamond product of power series as defined by Dukes and White. Cf. A015575.
The black diamond product A(x) o A(x) is the g.f. for the number of closed walks of length n at a vertex along the edges of the 15-simplex. (End)

A109499 Number of closed walks of length n on the complete graph on 5 nodes from a given node.

Original entry on oeis.org

1, 0, 4, 12, 52, 204, 820, 3276, 13108, 52428, 209716, 838860, 3355444, 13421772, 53687092, 214748364, 858993460, 3435973836, 13743895348, 54975581388, 219902325556, 879609302220, 3518437208884, 14073748835532
Offset: 0

Views

Author

Mitch Harris, Jun 30 2005

Keywords

Crossrefs

Cf. A108020 (bisection), A109502.

Programs

  • GAP
    a:=[1,0];; for n in [3..30] do a[n]:=3*a[n-1]+4*a[n-2]; od; a; # G. C. Greubel, Mar 23 2019
  • Magma
    [(4^n + 4*(-1)^n)/5: n in [0..30]]; // Vincenzo Librandi, Aug 12 2011
    
  • Mathematica
    CoefficientList[Series[(1-3*x)/(1-3*x-4*x^2), {x,0,30}], x] (* or *) LinearRecurrence[{3,4}, {1,0}, 30] (* G. C. Greubel, Dec 30 2017 *)
  • PARI
    a(n)=(4^n+4*(-1)^n)/5 \\ Charles R Greathouse IV, Oct 01 2012
    
  • Sage
    [(4^n+4*(-1)^n)/5 for n in (0..30)] # G. C. Greubel, Mar 23 2019
    

Formula

G.f.: (1 - 3*x)/(1 - 3*x - 4*x^2).
a(n) = (4^n + 4*(-1)^n)/5.
a(n+1) = 4*A015521(n). - Paul Curtz, Nov 01 2009
a(n) = 3*a(n-1) + 4*a(n-1). - G. C. Greubel, Dec 30 2017
a(n) = A108020((n - 1) / 2) = 'ccc...c' (n digits) in base 16, for odd n. - Georg Fischer, Mar 23 2019
E.g.f.: (exp(4*x) + 4*exp(-x))/5. - G. C. Greubel, Mar 23 2019

Extensions

Corrected by Franklin T. Adams-Watters, Sep 18 2006

A109500 Number of closed walks of length n on the complete graph on 6 nodes from a given node.

Original entry on oeis.org

1, 0, 5, 20, 105, 520, 2605, 13020, 65105, 325520, 1627605, 8138020, 40690105, 203450520, 1017252605, 5086263020, 25431315105, 127156575520, 635782877605, 3178914388020, 15894571940105, 79472859700520
Offset: 0

Views

Author

Mitch Harris, Jun 30 2005

Keywords

Crossrefs

Cf. A109502.
Cf. sequences with the same recurrence form: A001045, A078008, A097073, A115341, A015518, A054878, A015521, A109499, A015531. - Vladimir Joseph Stephan Orlovsky, Dec 11 2008

Programs

  • Magma
    [(5^n + 5*(-1)^n)/6: n in [0..30]]; // G. C. Greubel, Dec 30 2017
  • Mathematica
    k=0;lst={k};Do[k=5^n-k;AppendTo[lst, k], {n, 1, 5!}];lst (* Vladimir Joseph Stephan Orlovsky, Dec 11 2008 *)
    CoefficientList[Series[(1 - 4*x)/(1 - 4*x - 5*x^2), {x, 0, 50}], x] (* or *) Table[(5^n + 5*(-1)^n)/6, {n,0,30}] (* G. C. Greubel, Dec 30 2017 *)
  • PARI
    for(n=0, 30, print1((5^n + 5*(-1)^n)/6, ", ")) \\ G. C. Greubel, Dec 30 2017
    

Formula

G.f.: (1 - 4*x)/(1 - 4*x - 5*x^2).
a(n) = (5^n + 5*(-1)^n)/6.
a(n) = 5^(n-1) - a(n-1), a(0) = 1. - Jon E. Schoenfield, Feb 08 2015

Extensions

Corrected by Franklin T. Adams-Watters, Sep 18 2006
Edited by Jon E. Schoenfield, Feb 08 2015

A109501 Number of closed walks of length n on the complete graph on 7 nodes from a given node.

Original entry on oeis.org

1, 0, 6, 30, 186, 1110, 6666, 39990, 239946, 1439670, 8638026, 51828150, 310968906, 1865813430, 11194880586, 67169283510, 403015701066, 2418094206390, 14508565238346, 87051391430070, 522308348580426, 3133850091482550, 18803100548895306, 112818603293371830
Offset: 0

Views

Author

Mitch Harris, Jun 30 2005

Keywords

Crossrefs

Cf. A109502.
Cf. sequences with the same recurrence form: A001045, A078008, A097073, A115341, A015518, A054878, A015521, A109499, A015531, A109500, A015540. - Vladimir Joseph Stephan Orlovsky, Dec 11 2008

Programs

  • Magma
    [(6^n + 6*(-1)^n)/7: n in [0..30]]; // G. C. Greubel, Dec 30 2017
  • Mathematica
    k=0;lst={k};Do[k=6^n-k;AppendTo[lst, k], {n, 1, 5!}];lst (* Vladimir Joseph Stephan Orlovsky, Dec 11 2008 *)
    CoefficientList[Series[(1 - 5*x)/(1 - 5*x - 6*x^2), {x, 0, 50}], x] (* or *) LinearRecurrence[{5,6}, {1,0}, 30] (* G. C. Greubel, Dec 30 2017 *)
  • PARI
    for(n=0,30, print1((6^n + 6*(-1)^n)/7, ", ")) \\ G. C. Greubel, Dec 30 2017
    

Formula

G.f.: (1 - 5*x)/(1 - 5*x - 6*x^2).
a(n) = (6^n + 6*(-1)^n)/7.
a(n) = 6^(n-1) - a(n-1), a(0) = 1. - Jon E. Schoenfield, Feb 09 2015
a(n) = 5*a(n-1) + 6*a(n-2). - G. C. Greubel, Dec 30 2017
E.g.f.: exp(-x)*(exp(7*x) + 6)/7. - Elmo R. Oliveira, Aug 17 2024

Extensions

Corrected by Franklin T. Adams-Watters, Sep 18 2006
Edited by Jon E. Schoenfield, Feb 09 2015

A062160 Square array T(n,k) = (n^k - (-1)^k)/(n+1), n >= 0, k >= 0, read by falling antidiagonals.

Original entry on oeis.org

0, 1, 0, -1, 1, 0, 1, 0, 1, 0, -1, 1, 1, 1, 0, 1, 0, 3, 2, 1, 0, -1, 1, 5, 7, 3, 1, 0, 1, 0, 11, 20, 13, 4, 1, 0, -1, 1, 21, 61, 51, 21, 5, 1, 0, 1, 0, 43, 182, 205, 104, 31, 6, 1, 0, -1, 1, 85, 547, 819, 521, 185, 43, 7, 1, 0, 1, 0, 171, 1640, 3277, 2604, 1111, 300, 57, 8, 1, 0, -1, 1, 341, 4921, 13107, 13021, 6665, 2101, 455, 73, 9, 1, 0
Offset: 0

Views

Author

Henry Bottomley, Jun 08 2001

Keywords

Comments

For n >= 1, T(n, k) equals the number of walks of length k between any two distinct vertices of the complete graph K_(n+1). - Peter Bala, May 30 2024

Examples

			From _Seiichi Manyama_, Apr 12 2019: (Start)
Square array begins:
   0, 1, -1,  1,  -1,    1,    -1,      1, ...
   0, 1,  0,  1,   0,    1,     0,      1, ...
   0, 1,  1,  3,   5,   11,    21,     43, ...
   0, 1,  2,  7,  20,   61,   182,    547, ...
   0, 1,  3, 13,  51,  205,   819,   3277, ...
   0, 1,  4, 21, 104,  521,  2604,  13021, ...
   0, 1,  5, 31, 185, 1111,  6665,  39991, ...
   0, 1,  6, 43, 300, 2101, 14706, 102943, ... (End)
		

Crossrefs

Related to repunits in negative bases (cf. A055129 for positive bases).
Main diagonal gives A081216.
Cf. A109502.

Programs

  • Maple
    seq(print(seq((n^k - (-1)^k)/(n+1), k = 0..10)), n = 0..10); # Peter Bala, May 31 2024
  • Mathematica
    T[n_,k_]:=(n^k - (-1)^k)/(n+1); Join[{0},Table[Reverse[Table[T[n-k,k],{k,0,n}]],{n,12}]]//Flatten (* Stefano Spezia, Feb 20 2024 *)

Formula

T(n, k) = n^(k-1) - n^(k-2) + n^(k-3) - ... + (-1)^(k-1) = n^(k-1) - T(n, k-1) = n*T(n, k-1) - (-1)^k = (n - 1)*T(n, k-1) + n*T(n, k-2) = round[n^k/(n+1)] for n > 1.
T(n, k) = (-1)^(k+1) * resultant( n*x + 1, (x^k-1)/(x-1) ). - Max Alekseyev, Sep 28 2021
G.f. of row n: x/((1+x) * (1-n*x)). - Seiichi Manyama, Apr 12 2019
E.g.f. of row n: (exp(n*x) - exp(-x))/(n+1). - Stefano Spezia, Feb 20 2024
From Peter Bala, May 31 2024: (Start)
Binomial transform of the m-th row: Sum_{k = 0..n} binomial(n, k)*T(m, k) = (m + 1)^(n-1) for n >= 1.
Let R(m, x) denote the g.f. of the m-th row of the square array. Then R(m_1, x) o R(m_2, x) = R(m_1 + m_2 + m_1*m_2, x), where o denotes the black diamond product of power series as defined by Dukes and White. Cf. A109502.
T(m_1 + m_2 + m_1*m_2, k) = Sum_{i = 0..k} Sum_{j = i..k} binomial(k, i)* binomial(k-i, j-i)*T(m_1, j)*T(m_2, k-i). (End)
Showing 1-5 of 5 results.