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.

User: Christian Barrientos

Christian Barrientos's wiki page.

Christian Barrientos has authored 10 sequences.

A374722 Number of nonisomorphic spanning trees of the nC_5-snake with constant distance between cutpoints.

Original entry on oeis.org

1, 6, 24, 120, 570, 2850, 14100, 70500, 351750, 1758750, 8790000, 43950000, 219731250, 1098656250, 5493187500, 27465937500, 137329218750, 686646093750, 3433228125000, 17166140625000, 85830691406250, 429153457031250, 2145767226562500, 10728836132812500, 53644180371093750
Offset: 1

Author

Christian Barrientos, Jul 17 2024

Keywords

Comments

a(n) is the number of spanning trees of the cyclic snake formed with n copies of the cycle on 5 vertices. A cyclic snake is a connected graph whose block-cutpoint is a path and all its n blocks are isomorphic to the cycle C_m.

Examples

			For n=2, a(2)=6 because there are 6 spanning trees of 2C_5-snake
__ __ __ __ __ __ __ __, __ __ __ __|__ __ __, __ __ __ \/__ __ __,
            __              __           __
__ __ __ __|__ __, __ __ __|__ __, __ __|__ __
                           |            |__
		

References

  • Christian Barrientos, Graceful labelings of cyclic snakes, Ars Combin., 60 (2001), 85-96.

Crossrefs

Cf. A374721.

Programs

  • Mathematica
    Drop[CoefficientList[Series[x*(1 + x - 11*x^2 - 5*x^3)/((1 - 5*x)*(1 - 5*x^2)),{x,0,30}],x],1] (* Georg Fischer, Aug 09 2024 *)
  • PARI
    for(n=1, 30, print1(if(n==1,1,(3/2)*(3* 5^(n - 2) + 5^floor((n - 2)/2))),",")) \\ Georg Fischer, Aug 09 2024

Formula

a(n) = (3/2)*(3* 5^(n - 2) + 5^floor((n - 2)/2)) for n > 1.
From Stefano Spezia, Jul 23 2024: (Start)
G.f.: x*(1 + x - 11*x^2 - 5*x^3)/((1 - 5*x)*(1 - 5*x^2)).
E.g.f.: (24 + 10*x - 9*cosh(5*x) - 15*cosh(sqrt(5)*x) - 9*sinh(5*x) - 3*sqrt(5)*sinh(sqrt(5)*x))/50. (End)

Extensions

a(25) corrected by Georg Fischer, Aug 09 2024

A374721 Number of nonisomorphic spanning trees of the triangular snake nC_3.

Original entry on oeis.org

1, 3, 7, 21, 57, 171, 495, 1485, 4401, 13203, 39447, 118341, 354537, 1063611, 3189375, 9568125, 28700001, 86100003, 258286887, 774860661, 2324542617, 6973627851, 20920765455, 62762296365, 188286534801, 564859604403, 1694577750327, 5083733250981, 15251196564297, 45753589692891
Offset: 1

Author

Christian Barrientos, Jul 17 2024

Keywords

Comments

a(n) is the number of spanning trees of the cyclic snake formed with n copies of the cycle on 3 vertices. A cyclic snake is a connected graph whose block-cutpoint is a path and all its n blocks are isomorphic to the cycle C_m.

Examples

			For n=2 the a(2)=3 nonisomorphic spanning trees of 2C_3-snake are:
__ __ __ __, __\__ __, __\/__
		

References

  • Christian Barrientos, Graceful labelings of cyclic snakes, Ars Combin., 60 (2001), 85-96.

Crossrefs

Cf. A374722.

Programs

  • Mathematica
    A374721[n_] := 2*3^(n - 2) + 3^Floor[(n - 2)/2]; Array[A374721, 30] (* or *)
    LinearRecurrence[{3, 3, -9}, {1, 3, 7}, 30] (* Paolo Xausa, Oct 17 2024 *)

Formula

a(n) = 2*3^(n-2) + 3^floor((n-2)/2).
From Stefano Spezia, Jul 20 2024: (Start)
G.f.: x*(1 - 5*x^2)/((1 - 3*x)*(1 - 3*x^2)).
E.g.f.: (2*cosh(3*x) + 3*cosh(sqrt(3)*x) + 2*sinh(3*x) + sqrt(3)*sinh(sqrt(3)*x) - 5)/9. (End)

A329910 Number of harmoniously labeled graphs with n edges and at most n vertices.

Original entry on oeis.org

0, 0, 1, 4, 32, 72, 2187, 20736, 262144, 3200000, 48828125, 729000000, 13060694016, 230539333248, 4747561509943, 96717311574016, 2251799813685250, 51998697814229000, 1350851717672990000, 34867844010000000000, 1000000000000000000000, 28531167061100000000000
Offset: 1

Author

Christian Barrientos, Nov 23 2019

Keywords

Comments

A graph G with n edges is harmonious if there is an injection f from its vertex set to the group of integers modulo n such that when each edge uv of G is assigned the weight f(u)+f(v) (mod n), the resulting weights are distinct.

Examples

			a(3)=1 because there is only one harmonious graph with 3 edges and at most 3 vertices.
		

Crossrefs

A085526 contains the odd-indexed terms.

Programs

  • Mathematica
    Table[If[EvenQ[n],(n*(n-2)/4)^(n/2),((n-1)/2)^n],{n,1,22}] (* Stefano Spezia, Nov 24 2019 *)

Formula

For n odd, a(n) = ((n-1)/2)^n. For n even, a(n) = (n*(n-2)/4)^(n/2).

A308203 Array read by ascending antidiagonals: T(n,k) = number of non-isomorphic kC_n-snakes for n >= 3 and k >= 2.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 2, 3, 1, 1, 3, 3, 6, 1, 1, 3, 6, 6, 10, 1, 1, 4, 6, 18, 10, 20, 1, 1, 4, 10, 18, 45, 20, 36, 1, 1, 5, 10, 40, 45, 135, 36, 72, 1, 1, 5, 15, 40, 136, 135, 378, 72, 136, 1, 1, 6, 15, 75, 136, 544, 378, 1134, 136, 272, 1
Offset: 3

Author

Christian Barrientos, May 15 2019

Keywords

Comments

A kC_n-snake is a connected graph in which the k >= 2 blocks are isomorphic to the cycle C_n and the block-cutpoint graph is a path.

Examples

			T(n,2)=1 because there is only one way to connect two copies of C_n.
T(3,k)=1 because C_3 is isomorphic to K_3 and all the selections of 2 cutpoints, in each interior copy of C_3, are equivalent.
T(5,4)=3 there are only 3 non-equivalent strings of length 2 corresponding to the distances between consecutive cutpoints: 11, 12, and 2,2.
Table begins:
1    1    1     1      1       1        1         1          1           1            1
1    2    3     6     10      20       36        72        136         272          528
1    2    3     6     10      20       36        72        136         272          528
1    3    6    18     45     135      378      1134       3321        9963        29646
1    3    6    18     45     135      378      1134       3321        9963        29646
1    4   10    40    136     544     2080      8320      32896      131584       524800
1    4   10    40    136     544     2080      8320      32896      131584       524800
1    5   15    75    325    1625     7875     39375     195625      978125      4884375
1    5   15    75    325    1625     7875     39375     195625      978125      4884375
1    6   21   126    666    3996    23436    140616     840456     5042736     30236976
1    6   21   126    666    3996    23436    140616     840456     5042736     30236976
1    7   28   196   1225    8575    58996    412972    2883601    20185207    141246028
1    7   28   196   1225    8575    58996    412972    2883601    20185207    141246028
1    8   36   288   2080   16640   131328   1050624    8390656    67125248    536887296
1    8   36   288   2080   16640   131328   1050624    8390656    67125248    536887296
1    9   45   405   3321   29889   266085   2394765   21526641   193739769   1743421725
1    9   45   405   3321   29889   266085   2394765   21526641   193739769   1743421725
1   10   55   550   5050   50500   500500   5005000   50005000   500050000   5000050000
		

Formula

For n >= 3 and k >= 2, T(n,k) = (floor(n/2)^(k-2) + floor(n/2)^(floor(k-1)/2))/2.
For n even, T(n, 2)=1, if k is odd T(n,k)=(n/2)*T(n,k-1), if k is even T(n,k)=(n/2)*T(n,k-1)-((n-2)/4)*(n/2)^((k-2)/2).

A317489 Irregular triangle read by rows. For n >= 3 and 1 <= k <= floor(n/3), T(n,k) is the number of palindromic compositions of n into k parts of size at least 3.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 2, 1, 1, 2, 1, 1, 0, 3, 0, 1, 1, 3, 2, 1, 0, 4, 0, 1, 1, 1, 4, 3, 1, 1, 0, 5, 0, 3, 1, 1, 5, 4, 3, 1, 1, 0, 6, 0, 6, 0, 1, 1, 6, 5, 6, 3, 1, 0, 7, 0, 10, 0, 1, 1, 1, 7, 6, 10, 6, 1, 1, 0, 8, 0, 15, 0, 4, 1, 1, 8, 7, 15, 10, 4, 1, 1, 0, 9, 0, 21, 0, 10, 0, 1, 1, 9, 8, 21, 15, 10, 4, 1, 0, 10, 0, 28, 0, 20, 0, 1, 1, 1, 10, 9, 28, 21, 20, 10, 1, 1, 0, 11, 0, 36, 0, 35, 0, 5
Offset: 3

Author

Keywords

Examples

			For n=24 and k=3, T(24,3) = 8 = binomial((24-2)/2-3, (3-1)/2) = binomial(8,1).
The first entries of the irregular triangle formed by the values of T(n,k) are:
  1;
  1;
  1;
  1,  1;
  1,  0;
  1,  1;
  1,  0,  1;
  1,  1,  1;
  1,  0,  2;
  1,  1,  2,  1;
  1,  0,  3,  0;
  1,  1,  3,  2;
  1,  0,  4,  0,  1;
  1,  1,  4,  3,  1;
  1,  0,  5,  0,  3;
  1,  1,  5,  4,  3,  1;
  1,  0,  6,  0,  6,  0;
  1,  1,  6,  5,  6,  3;
  1,  0,  7,  0, 10,  0,  1;
  1,  1,  7,  6, 10,  6,  1;
  1,  0,  8,  0, 15,  0,  4;
  1,  1,  8,  7, 15, 10,  4,  1;
  1,  0,  9,  0, 21,  0, 10,  0;
  1,  1,  9,  8, 21, 15, 10,  4;
  1,  0, 10,  0, 28,  0, 20,  0,  1;
  1,  1, 10,  9, 28, 21, 20, 10,  1;
  1,  0, 11,  0, 36,  0, 35,  0,  5;
		

Crossrefs

Row sums of the triangle equal A226916(n+4).

Programs

  • Mathematica
    T[n_, k_] := If[Mod[n, 2] == 1 && Mod[k, 2] == 0, 0, Binomial[Quotient[n-1, 2] - k, Quotient[k-1, 2]]];
    Table[T[n, k], {n, 3, 30}, {k, 1, Quotient[n, 3]}] // Flatten (* Jean-François Alcover, Sep 13 2018, from PARI *)
  • PARI
    T(n,k)=if(n%2==1&&k%2==0, 0,  binomial((n-1)\2-k, (k-1)\2)); \\ Andrew Howroyd, Sep 07 2018

Formula

T(n,k) = 0 if n is odd and k is even;
T(n,k) = binomial((n-1)/2-k,(k-1)/2) if n is odd and k is odd;
T(n,k) = binomial((n-2)/2-k,(k-1)/2) if n is even and k is odd;
T(n,k) = binomial((n-2)/2-k,(k-2)/2) if n is even and k is even.

A255908 Triangle read by rows: T(n,L) = number of rho-labeled graphs with n edges whose labeling is bipartite with boundary value L.

Original entry on oeis.org

2, 4, 8, 8, 32, 48, 16, 128, 288, 384, 32, 512, 1728, 3072, 3840, 64, 2048, 10368, 24576, 38400, 46080, 128, 8192, 62208, 196608, 384000, 552960, 645120, 256, 32768, 373248, 1572864, 3840000, 6635520, 9031680, 10321920, 512, 131072, 2239488, 12582912, 38400000, 79626240, 126443520, 165150720, 185794560, 1024, 524288, 13436928, 100663296, 384000000, 955514880, 1770209280, 2642411520, 3344302080, 3715891200
Offset: 1

Author

Keywords

Comments

A graph with n edges is rho-labeled if there exists a one-to-one mapping from its vertex set to {0,1,...,2n} such that every edge receives as label the absolute difference of its end-vertices and the edge labels are x_1, x_2, ..., x_n where x_i = i or x_i = 2n + 1 - i. A rho-labeling of a bipartite graph is said to be bipartite when the labels of one stable set are smaller than the labels on the other stable set. The largest of the smaller vertex labels is its boundary value.
From Robert G. Wilson v, Jul 05 2015: (Start)
The columns:
T(n, 0) = 2^n,
T(n, 1) = 2^(2n-1),
T(n, 2) = 2^(n+1)*3^(n-2),
T(n, 3) = 3*2^(3n-5),
T(n, 4) = 3*2^(n+3)*5^(n-4),
T(n, 5) = 5*2^(2n-2)*3^(n-4), etc.
The diagonals:
the main, T(n, n-1) = 2^n*n*(n-1!) = 2*A002866,
the second diagonal, T(n, n-2) = 2^n*(n-1)^2*(n-2)! = 4*A014479,
the third diagonal, T(n, n-3) = 2^n*(n-2)^3*(n-3)!,
the k_th diagonal, T(n, n-k) = 2^n*(n-k)^k*(n-k)!, etc.
... (End)

Examples

			For n=5 and L=1, T(5,1)=(2^5)*(1!)*(1+1)^(5-1)=512.
For n=9 and L=3, T(9,3)=12582912.
Triangle, T, begins:
-----------------------------------------------------------------------------
n\L |   0       1         2          3          4          5           6
----|------------------------------------------------------------------------
1   |   2;
2   |   4,      8;
3   |   8,     32,       48;
4   |  16,    128,      288,       384;
5   |  32,    512,     1728,      3072,      3840;
6   |  64,   2048,    10368,     24576,     38400,     46080;
7   | 128,   8192,    62208,    196608,    384000,    552960,     645120;
8   | 256,  32768,   373248,   1572864,   3840000,   6635520,    9031680, ...
...
For n=2 and L=1, T(2,1)=8, because: the bipartite graph <{v1,v2,v3},{x1=v1v2,x2=v1v3}> has rho-labelings (2,1,3),(2,1,4) with L=1 on the stable set {x2} and rho-labelings (1,2,0),(0,4,1) with L=1 on the stable set {x1,x3}; the bipartite graph <{v1,v2,v3,v4},{x1=v1v2,x2=v3v4}> has rho-labeling (0,4,1,3),(1,2,0,3) with L=1 on the stable set {v1,v3} and rho-labeling (4,0,3,1),(2,1,3,0) with L=1 on the stable set {v2,v4}. - _Danny Rorabaugh_, Apr 03 2015
		

Programs

  • Magma
    [2^n*Factorial(l)*(l+1)^(n-l): l in [0..n-1], n in [1..10]]; // Bruno Berselli, Aug 05 2015
  • Mathematica
    t[n_, l_] := 2^n*l!(l+1)^(n-l); Table[ t[n, l], {n, 8}, {l, 0, n-1}] // Flatten (* Robert G. Wilson v, Jul 05 2015 *)

Formula

For n>=1, 0<=L<=n-1, T(n,L)=(2^n)*(L!)*(L+1)^(n-L).

A245519 Number of alpha-labeled graphs with n edges and at most n vertices.

Original entry on oeis.org

0, 0, 0, 2, 10, 64, 336, 1872, 11104, 71944, 508032, 3511232, 27192704, 223750464, 1947253504, 17899536448, 173156535168, 1760383827776, 18752453106176, 209034916385472, 2432351796434560, 29509268795249700
Offset: 1

Author

Keywords

Examples

			For n=4, a(4)=2, there are 2 alpha-labeled graphs with 4 edges and at most 4 vertices.
For n=10, a(10)=71944, there are 71944 alpha-labeled graphs with 10 edges and at most 10 vertices.
		

Crossrefs

Formula

a(n) = Sum_{L=1..n-2} Sum_{i=1..n-1} Product_{k=1..n} d(L,k,i), where
for i < L,
d(L,k) if 1 <= k <= i,
d(L,k,i) ={ d(L,k) - 1 if i < k < n - i,
d(L,k) if n - i <= k <= n;
for i > L + 1,
d(L,k) if 1 <= k <= n - i,
d(L,k,i) ={ d(L,k) - 1 if n - i < k < n - i + L + 2,
d(L,k) if n - i + L + 2 <= k <= n.
k if 1 <= k < m,
d(L,k) ={ L + 1 if m <= k <= M,
n + 1 - k if M < k <= n,
m = min{L + 1, n - L}, M = max{L + 1, n - L}.

A245518 Irregular triangle read by rows: T(n,i) = number of alpha-labeled graphs with n edges that do not use the label i, for 1 <= i <= n-1 and n >= 4.

Original entry on oeis.org

1, 0, 1, 4, 2, 2, 4, 16, 12, 8, 12, 16, 64, 64, 40, 40, 64, 64, 284, 328, 236, 176, 236, 328, 284, 1360, 1760, 1432, 1000, 1000, 1432, 1760, 1360, 7184, 9928, 9092, 6536, 5312, 6536, 9092, 9928, 7184
Offset: 4

Author

Keywords

Examples

			For n=4 and i=2, a(4,2) = 0.
For n=8 and i=5, a(8,5) = 64.
Triangle begins:
[n\i] [1]     [2]     [3]     [4]     [5]     [6]     [7]     [8]     [9]
[4]    1,      0,      1;
[5]    4,      2,      2,      4;
[6]    16,     12,     8,      12,     16;
[7]    64,     64,     40,     40,     64,     64;
[8]    284,    328,    236,    176,    236,    328,    284;
[9]    1360,   1760,   1432,   1000,   1000,   1432,   1760,   1360;
[10]   7184,   9928,   9092,   6536,   5312,   6536,   9092,   9928,   7184;
. . .
		

Crossrefs

Formula

a(n,i) = sum_{L=1..^n-2} product_{k=1..n} d(L,k,i), where
for i < L,
d(L,k) if 1 <= k <= i,
d(L,k,i) ={ d(L,k) - 1 if i < k < n - i,
d(L,k) if n - i <= k <= n;
for i > L + 1,
d(L,k) if 1 <= k <= n - i,
d(L,k,i) ={ d(L,k) - 1 if n - i < k < n - i + L + 2,
d(L,k) if n - i + L + 2 <= k <= n.
k if 1 <= k < m,
d(L,k) ={ L + 1 if m <= k <= M,
n + 1 - k if M < k <= n,
m = min{L + 1, n - L}, M = max{L + 1, n - L}.

A245517 Irregular triangle read by rows: T(n,L) = number of alpha-labeled graphs with n edges and boundary value L that do not use one number from (1,2,...,n-1) as a label (n >= 4, 1 <= L <= n - 2).

Original entry on oeis.org

1, 1, 4, 4, 4, 12, 20, 20, 12, 32, 88, 96, 88, 32, 80, 352, 504, 504, 352, 80, 192, 1328, 2592, 2880, 2592, 1328, 192, 448, 4816, 12852, 17280, 17280, 12852, 4816, 448
Offset: 4

Author

Keywords

Examples

			For n=9 and L=5, T(9,5) = 2592.
For n=10 and L=4, T(10,4) = 17280.
Triangle begins:
[n\L]  [1]     [2]     [3]     [4]     [5]     [6]     [7]     [8]
[4]     1,      1;
[5]     4,      4,      4;
[6]     12,     20,     20,     12;
[7]     32,     88,     96,     88,     32;
[8]     80,     352,    504,    504,    352,    80;
[9]     192,    1328,   2592,   2880,   2592,   1328,   192;
[10]    448,    4816,   12852,  17280,  17280,  12852,  4816,   448;
...
		

Crossrefs

Formula

a(n,L,i) = \sum_{i = 1}^{n - 1} \prod_{k = 1}^{n} d(L,k,i), where
for i < L,
d(L,k) if 1 <= k <= i,
d(L,k,i) ={ d(L,k) - 1 if i < k < n - i,
d(L,k) if n - i <= k <= n;
for i > L + 1,
d(L,k) if 1 <= k <= n - i,
d(L,k,i) ={ d(L,k) - 1 if n - i < k < n - i + L + 2,
d(L,k) if n - i + L + 2 <= k <= n.
k if 1 <= k < m,
d(L,k) ={ L + 1 if m <= k <= M,
n + 1 - k if M < k <= n,
m = min{L + 1, n - L}, M = max{L + 1, n - L}.

A241094 Triangle read by rows: T(n,i) = number of gracefully labeled graphs with n edges that do not use the label i, 1 <= i <= n-1, n > 1.

Original entry on oeis.org

0, 1, 1, 4, 4, 4, 18, 24, 24, 18, 96, 144, 144, 96, 600, 960, 1080, 1080, 960, 600, 4320, 7200, 8460, 8460, 8460, 7200, 4320, 35280, 60840, 75600, 80640, 80640, 75600, 60480, 35280, 322560, 564480, 725760, 806400, 806400, 806400, 725760, 564480, 322560
Offset: 2

Author

Keywords

Comments

A graph with n edges is graceful if its vertices can be labeled with distinct integers in the range 0,1,...,n in such a way that when the edges are labeled with the absolute differences between the labels of their end-vertices, the n edges have the distinct labels 1,2,...,n.

Examples

			For n=7 and i=3, g(7,3) = 1080.
For n=7 and i=5, g(7,5) = 960.
Triangle begins:
[n\i]  [1]     [2]     [3]     [4]     [5]     [6]     [7]     [8]
[2]     0;
[3]     1,      1;
[4]     4,      4,      4;
[5]    18,     24,     24,     18;
[6]    96,    144,    144,    144,     96;
[7]   600,    960,   1080,   1080,    960,    600;
[8]  4320,   7200,   8640,   8640,   8640,   7200,   4320;
[9] 35280,  60480,  75600,  80640,  80640,  75600,  60480,  35280;
...
- _Bruno Berselli_, Apr 23 2014
		

Programs

  • Magma
    /* As triangle: */ [[i le Floor(n/2) select Factorial(n-2)*(n-1-i)*i else Factorial(n-2)*(n-i)*(i-1): i in [1..n-1]]: n in [2..10]]; // Bruno Berselli, Apr 23 2014
  • Maple
    Labeled:=(i,n) piecewise(n<2 or i<1, -infinity, 1 <= i <= floor(n/2), GAMMA(n-1)*(n-1-i)*i, ceil((n+1)/2) <= i <= n-1, GAMMA(n-1)*(n-i)*(i-1), infinity):
  • Mathematica
    n=10; (* This number must be replaced every time in order to produce the different entries of the sequence *)
    For[i = 1, i <= Floor[n/2], i++, g[n_,i_]:=(n-2)!*(n-1-i)*i; Print["g(",n,",",i,")=", g[n,i]]]
    For[i = Ceiling[(n+1)/2], i <= (n-1), i++, g[n_,i_]:=(n-2)!*(n-i)*(i-1); Print["g(",n,",",i,")=",g[n,i]]]

Formula

For n >=2, if 1 <= i <= floor(n/2), g(n,i) = (n-2)!*(n-1-i)*i; if ceiling((n+1)/2) <= i <= n-1, g(n,i) = (n-2)!*(n-i)*(i-1).
# alternative
A241094 := proc(n,i)
if n <2 or i<1 or i >= n then
0;
elif i <= floor(n/2) then
GAMMA(n-1)*(n-1-i)*i;
else
GAMMA(n-1)*(n-i)*(i-1) ;
fi ;
end proc:
seq(seq(A241094(n,i),i=1..n-1),n=2..12); # R. J. Mathar, Jul 30 2024