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.

A002493 Number of ways to arrange n non-attacking kings on an n X n board, with 2 sides identified to form a cylinder, with 1 in each row and column.

Original entry on oeis.org

1, 0, 0, 0, 10, 60, 462, 3920, 36954, 382740, 4327510, 53088888, 702756210, 9988248956, 151751644590, 2454798429600, 42130249479562, 764681923900260, 14636063499474054, 294639009867223880
Offset: 1

Views

Author

Keywords

Comments

Number of directed Hamiltonian paths in the complement of C_n where C_n is the n-cycle graph. - Andrew Howroyd, Mar 15 2016
Number of ways of arranging n consecutive integers in a circle such that no pair of adjacent integers differ by 1, rotations are distinct. - Graham Holmes, Sep 03 2020

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Right diagonal of A338838.

Programs

  • Maple
    b1:= proc(n, r) local gu, x; if r=0 then RETURN(0): fi: gu := (x*diff(x*(1+x)/(1-x),x))* (x*(1 + x)/(1 - x))^(r-1); gu := taylor(gu, x = 0, n +1); coeff(gu, x, n ) end: b:=proc(n) local r: if n=1 then 1 elif n=2 then 0 else add((-1)^(n-r)*r!*b1(n,r),r=0..n): fi: end: # Doron Zeilberger, Nov 14 2007
  • Mathematica
    b[n_]:=(If[n>0, n!+Sum[(-1)^r*(n-r)!*Sum[2^c*Binomial[r-1, c-1]*Binomial[n-r,c], {c, 1, r}], {r, 1, n-1}], 0]); Table[If[n>2, b[n]-2*Sum[b[n-1-2k], {k, 0, Floor[n/2]}], If[n==1, 1, 0]], {n, 1, 25}] (* Vaclav Kotesovec after Vladeta Jovovic, Apr 06 2012 *)

Formula

The linear recurrence operator annihilating this sequence is (N is the shift operator Na(n):=a(n + 1)) is - 3*(43*n + 197)*(n - 2)*(n + 1)/( - 1222 + 753*n + 349*n^2) - 5*(n - 1)*(44*n^2 + 477*n + 1222)/( - 1222 + 753*n + 349*n^2)*N + 2*(n + 1)*(239*n^2 + 873*n - 1232)/( - 1222 + 753*n + 349*n^2)*N^2 + 4*(394 - 259*n + 215*n^2 + 55*n^3)/( - 1222 + 753*n + 349*n^2)*N^3 - ( - 7342 + 3699*n + 2718*n^2 + 349*n^3)/( - 1222 + 753*n + 349*n^2)*N^4 + N^5. - Doron Zeilberger, Nov 14 2007
a(n) = Sum((-1)^(n-k)*k!*A102413(n,k),k=1..n), n>2. - Vladeta Jovovic, Nov 23 2007
a(n) = b(n+1) - 2*Sum_{k=0..floor(n/2)} b(n-2*k) for n>1, where b(n)=A002464(n) if n>0 else b(0)=0. - Vladeta Jovovic, Nov 24 2007
Asymptotic: a(n) ~ n!/e^2*(1 - 2/n - 2/n^2 - 4/(3n^3) + 8/(3n^4) + 326/(15n^5) + 4834/(45n^6) + 154258/(315n^7) + 232564/(105n^8) + ...). - Vaclav Kotesovec, Apr 06 2012
a(n) = n! + Sum_{i=1..n-1} ((-1)^i * (n-i-1)! * n * Sum_{j=0..i-1} (2^(j+1) * C(i-1,j) * C(n-i,j+1))), for n>=5. - Andrew Woods, Jan 08 2015

A338849 Triangle read by rows: T(n,k) is the number of permutations of k elements from [1..n] in a circle where adjacent values cannot be consecutive modulo n, rotations are distinct.

Original entry on oeis.org

1, 1, 1, 1, 2, 0, 1, 3, 0, 0, 1, 4, 4, 0, 0, 1, 5, 10, 0, 0, 10, 1, 6, 18, 12, 24, 60, 36, 1, 7, 28, 42, 112, 280, 420, 322, 1, 8, 40, 96, 336, 1040, 2400, 3696, 2832, 1, 9, 54, 180, 792, 3060, 9540, 22428, 35280, 27954, 1, 10, 70, 300, 1600, 7540, 29880, 95340, 229280, 369540, 299260
Offset: 0

Views

Author

Xiangyu Chen, Nov 12 2020

Keywords

Comments

In a convex n-gon, the number of paths using k-1 diagonals and k non-repeated vertices, start and end vertices are not connected by a side.

Examples

			n\k  0    1    2    3    4    5    6    7    8
0    1
1    1    1
2    1    2    0
3    1    3    0    0
4    1    4    4    0    0
5    1    5    10   0    0    10
6    1    6    18   12   24   60   36
7    1    7    28   42   112  280  420  322
8    1    8    40   96   336  1040 2400 3696 2832
		

Crossrefs

Formula

T(n,k) = n*(A338526(n-1,k-1)-2*S(n-1,k-1)+Z2(n-1,k-1)) for k>0 except T(2,2)=0, T(n,0)=1, where Z2(n,k) = Z1(n,k) except Z2(n,1)=2, where Z1(n,k) = S(n-1,k-1)-Z(n-1,k-1) for k>0 except Z1(2,2)=0, Z1(n,0)=0, where S(n,k) = 2*A338526(n-1,k-1)-S(n-1,k-1) for k>0, S(n,0)=0.

A340106 Triangle read by rows: T(n,k) is the number of permutations of k elements from [1..n] with longest consecutive chain size less than 3.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 6, 4, 1, 4, 12, 20, 18, 1, 5, 20, 54, 100, 92, 1, 6, 30, 112, 318, 600, 570, 1, 7, 42, 200, 768, 2208, 4244, 4082, 1, 8, 56, 324, 1570, 6080, 17682, 34300, 33292, 1, 9, 72, 490, 2868, 13980, 54552, 159702, 311808, 304490, 1, 10, 90, 704, 4830, 28392, 139130, 545528, 1604616, 3147164, 3086890
Offset: 0

Views

Author

Xiangyu Chen, Dec 28 2020

Keywords

Comments

In a convex n-gon, the number of paths using k non-repeated vertices and fewer than 3 vertices (2 sides) in a row, except side (1,n) is unrestricted.

Examples

			n\k   0     1      2      3      4     5     6     7     8
0     1
1     1     1
2     1     2      2
3     1     3      6      4
4     1     4     12     20     18
5     1     5     20     54    100    92
6     1     6     30    112    318   600    570
7     1     7     42    200    768  2208   4244  4082
8     1     8     56    324   1570  6080  17682 34300 33292
		

Crossrefs

Right diagonal is A095816.

Formula

T(n,k) = A340107(n,k) + 2*O(n-1,k-1) + O(n-2,k-2), where O(n,k) = 2*(k-1)*T(n-1,k-1)/(n-1) - 2*O(n-1,k-1) + 3*O(n-2,k-2) + 2*O(n-3,k-3) + O(n-4,k-4), O(n,k)=0 for k<=1.

A340107 Triangle read by rows: T(n,k) is the number of permutations of k elements from [1..n] with longest consecutive chain size less than 3, when 1 and n are considered to be consecutive.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 6, 0, 1, 4, 12, 16, 16, 1, 5, 20, 50, 90, 80, 1, 6, 30, 108, 300, 552, 516, 1, 7, 42, 196, 742, 2100, 3990, 3794, 1, 8, 56, 320, 1536, 5888, 16976, 32656, 31456, 1, 9, 72, 486, 2826, 13680, 53046, 154350, 299628, 290970, 1, 10, 90, 700, 4780, 27960, 136380, 532340, 1559040, 3044900, 2974380
Offset: 0

Views

Author

Xiangyu Chen, Dec 28 2020

Keywords

Comments

In a convex n-gon, the number of paths using k non-repeated vertices and fewer than 3 vertices (2 sides) in a row.

Examples

			n\k   0     1     2     3     4     5     6     7     8
0     1
1     1     1
2     1     2      2
3     1     3      6      0
4     1     4     12     16     16
5     1     5     20     50     90    80
6     1     6     30    108    300   552    516
7     1     7     42    196    742  2100   3990  3794
8     1     8     56    320   1536  5888  16976 32656 31456
		

Crossrefs

Formula

T(n,k) = n*(A340106(n-1,k-1) - S(n-2,k-2)) except for T(n,0)=1, where S(n,k) = 2*A340106(n-1,k-1) - 2*A340106(n-2,k-2) + S(n-3,k-3), S(n,k)=0 for k <= 0. [exception added by Xiangyu Chen, Aug 19 2022]

A340108 Triangle read by rows: T(n,k) is the number of permutations of k elements from [1..n] in a circle with longest consecutive chain size less than 3, when 1 and n are considered to be consecutive, and rotations are considered to be distinct.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 6, 0, 1, 4, 12, 0, 16, 1, 5, 20, 30, 80, 60, 1, 6, 30, 84, 264, 480, 456, 1, 7, 42, 168, 672, 1890, 3612, 3458, 1, 8, 56, 288, 1424, 5440, 15744, 30352, 29296, 1, 9, 72, 450, 2664, 12870, 50004, 145656, 283104, 275166, 1, 10, 90, 660, 4560, 26640, 130080, 508060, 1488960, 2909700, 2843980
Offset: 0

Views

Author

Xiangyu Chen, Dec 28 2020

Keywords

Comments

In a convex n-gon, the number of cycles using k non-repeated vertices and fewer than 3 vertices (2 sides) in a row.

Examples

			n\k   0     1      2      3     4     5     6     7     8
0     1
1     1     1
2     1     2      2
3     1     3      6      0
4     1     4     12      0     16
5     1     5     20     30     80    60
6     1     6     30     84    264   480    456
7     1     7     42    168    672  1890   3612  3458
8     1     8     56    288   1424  5440  15744 30352 29296
		

Crossrefs

Formula

T(n,k) = n*(5*A340106(n-1,k-1) - 2*Z(n,k) - Z(n-1,k-1) - 2*S(n,k) - 2*S(n-2,k-2)) except for T(n,0)=1, where S(n,k) = 2*A340106(n-1,k-1) - 2*A340106(n-2,k-2) + S(n-3,k-3), S(n,k)=0 for k <= 0, Z(n,k) = 2*A340106(n-1,k-1) - S(n,k) - V(n-1,k-1), Z(n,k)=0 for k <= 0, V(n,k) = Z(n-1,k-1) - V(n-1,k-1), V(n,k)=0 for k <= 0 except for V(2,2)=2.

Extensions

Terms of column 2 corrected by Xiangyu Chen, Aug 19 2022
Showing 1-5 of 5 results.