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: Matthew Scroggs

Matthew Scroggs's wiki page.

Matthew Scroggs has authored 23 sequences. Here are the ten most recent ones:

A379766 Minimum number of kings that must be placed on an n X n chessboard such that each square is attacked or occupied by at least four kings.

Original entry on oeis.org

4, 9, 16, 16, 24, 36, 36, 47, 64, 64, 78, 100, 100, 117, 144, 144, 164, 196, 196, 219, 256, 256, 282, 324, 324, 353, 400, 400, 432, 484, 484, 519, 576, 576, 614, 676, 676, 717, 784, 784, 828, 900, 900, 947, 1024, 1024, 1074, 1156, 1156, 1209, 1296, 1296, 1352
Offset: 2

Author

Matthew Scroggs, Jan 02 2025

Keywords

Comments

At most one king can be placed on each square.

Examples

			For a 5 by 5 chessboard, the sixteen kings could be placed like this:
  kkokk
  kkokk
  ooooo
  kkokk
  kkokk
For a 6 by 6 chessboard, the kings could be placed like this:
  kkookk
  kkkkkk
  okooko
  okooko
  kkkkkk
  kkookk
where o is an empty square and k is a king.
		

Crossrefs

Formula

It appears that a(3n+1) = a(3n+2) - Dominic McCarty, Jan 17 2025
For n >= 2 we have a(n) = 4*floor(n/3)^2+3*floor(n/3)+2 if 3 divides n, a(n) = 4*(floor(n/3)+1)^2 otherwise. - Benoit Cloitre, Jan 17 2025
G.f.: -x^2*(4+5*x+7*x^2-2*x^4-2*x^5-8*x^3+4*x^6)/(1+x+x^2)^2/(x-1)^3 . - R. J. Mathar, Jan 27 2025

Extensions

a(9)-a(100) from Dominic McCarty, Jan 17 2025

A379759 Minimum number of kings that must be placed on an n X n chessboard such that each square is attacked or occupied by at least three kings.

Original entry on oeis.org

3, 5, 12, 12, 16, 27, 27, 33, 48, 48, 56, 75, 75, 85, 108, 108, 120, 147, 147, 161, 192, 192, 208, 243, 243, 261, 300, 300, 320, 363, 363, 385, 432, 432, 456, 507, 507, 533, 588, 588, 616, 675, 675, 705, 768, 768, 800, 867, 867, 901, 972, 972, 1008, 1083, 1083
Offset: 2

Author

Matthew Scroggs, Jan 02 2025

Keywords

Comments

At most one king can be placed on each square.

Examples

			For a 3 by 3 chessboard, the five kings could be placed like this:
   oko
   kkk
   oko
For a 4 by 4 chessboard, the kings could be placed like this:
   okko
   kkkk
   kkkk
   okko
where o is an empty square and k is a king.
		

Crossrefs

Formula

It appears that a(3n+1) = a(3n+2) - Dominic McCarty, Jan 17 2025

Extensions

a(9)-a(100) from Dominic McCarty, Jan 17 2025

A379726 Minimum number of kings that must be placed on an n X n chessboard such that each square is attacked or occupied by at least two kings.

Original entry on oeis.org

2, 3, 8, 8, 10, 18, 18, 21, 32, 32, 36, 50, 50, 55, 72, 72, 78, 98, 98, 105, 128, 128, 136, 162, 162, 171, 200, 200, 210, 242, 242, 253, 288, 288, 300, 338, 338, 351, 392, 392, 406, 450, 450, 465, 512, 512, 528, 578, 578, 595, 648, 648, 666, 722, 722, 741, 800, 800, 820, 882, 882, 903, 968, 968, 990, 1058, 1058, 1081, 1152, 1152, 1176, 1250, 1250, 1275, 1352, 1352, 1378, 1458, 1458, 1485, 1568, 1568, 1596, 1682, 1682, 1711, 1800, 1800, 1830, 1922, 1922, 1953, 2048, 2048, 2080, 2178, 2178, 2211, 2312
Offset: 2

Author

Matthew Scroggs, Dec 31 2024

Keywords

Comments

At most one king can be placed on each square.
Every third term is conjectured to be A014105. Other terms are A001105. A093353 is conjectured to be this sequence with repeated terms removed.
The above conjectures are true (see Beveridge link). - Colin Beveridge, Jan 13 2025

Examples

			For a 3 by 3 chessboard, the three kings could be placed like this (where o is an empty square and k is a king):
   ooo
   kkk
   ooo
For a 4 by 4 chessboard, the kings could be placed like this:
   oooo
   kkkk
   okko
   okko
		

Formula

If n is not a multiple of 3, a(n) = 2*floor((n+2)/3)^2.
If n is a multiple of 3, it is conjectured that a(n)=2*(n/3)^2+n/3.
The above conjectures are true (see Beveridge link). - Colin Beveridge, Jan 13 2025

Extensions

a(15)-a(100) via integer linear programming by Rob Pratt, Jan 02 2025

A367038 Number of 2^n-page booklets that can be made with n folds.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 31, 315434
Offset: 0

Author

Matthew Scroggs, Nov 02 2023

Keywords

Comments

The number of ways that a piece of paper that's been folded in half n times can be cut and folded to make a booklet with 2^n pages. Rotations and reflections of a pattern are considered to be the same pattern.

Examples

			For n=5, there are a(5)=3 ways to fold a booklet with 2^5=32 pages. Diagrams showing these 3 ways are included at the first M. Scroggs link.
		

A350843 The least number of terms needed in the Taylor series approximation of arctan(1/239) such that Machin's formula with n terms in the Taylor series approximation of arctan(1/5) achieves the most correct digits of Pi.

Original entry on oeis.org

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

Author

Matthew Scroggs, Jan 18 2022

Keywords

Comments

Machin's formula states that Pi/4 = 4*arctan(1/5) - arctan(1/239). An approximation of Pi can be found by computing this using a Taylor series approximation of arctan. If n terms are used in the approximation of arctan(1/5), then a(n) is the least number of terms that can be used in the approximation of arctan(1/239) to get the largest possible number of correct digits of Pi.

Examples

			When using 5 terms in the Taylor series expansion of arctan(1/5) and 2 terms in the expansion of arctan(1/239), Machin's formula gives 3.141592682405... which is correct to 7 decimal places. If more than 2 terms are used in the second expansion, no more correct digits are obtained. If fewer than 2 terms are used, fewer correct digits will be obtained. Therefore a(5) = 2.
		

Crossrefs

A350799(n) is the number of decimal places that will be correct when n terms are used for arctan(1/5) and a(n) terms are used for arctan(1/239).

A350799 The number of decimal places of Pi that are computed correctly when using Machin's formula with n terms of the Taylor series.

Original entry on oeis.org

1, 2, 3, 5, 7, 8, 9, 11, 12, 14, 16, 17, 18, 19, 21, 22, 24, 25, 27, 29, 30, 30, 32, 34, 36, 37, 38, 40, 40, 43, 42, 45, 47, 47, 49, 51, 53, 54, 55, 57, 58, 59, 60, 62, 64, 65, 67, 68, 69, 71, 72, 74, 75, 75, 77, 79, 80, 82
Offset: 1

Author

Matthew Scroggs, Jan 18 2022

Keywords

Comments

Machin's formula states that Pi/4 = 4*arctan(1/5) - arctan(1/239). An approximation of Pi can be found by computing this using a Taylor series approximation of arctan. a(n) is the number of decimal places that are correct when n terms are included in the Taylor series approximation.

Examples

			For n = 3, Machin's formula with three terms in the Taylor series gives 3.14162102932503442504 as an approximation of Pi. The first 3 decimal places (141) are correct, so a(3) = 3.
		

Crossrefs

A340266 The number of degrees of freedom in a quadrilateral cell for a serendipity finite element space of order n.

Original entry on oeis.org

4, 8, 12, 17, 23, 30, 38, 47, 57, 68, 80, 93, 107, 122, 138, 155, 173, 192, 212, 233, 255, 278, 302, 327, 353, 380, 408, 437, 467, 498, 530, 563, 597, 632, 668, 705, 743, 782, 822, 863, 905, 948, 992, 1037, 1083, 1130, 1178, 1227, 1277
Offset: 1

Author

Matthew Scroggs, Jan 02 2021

Keywords

Programs

  • Mathematica
    A340266[n_] := Module[{a}, a[1] = 4; a[i_] := a[i] = i*(i + 3)/2 + 3; a[n]]; Table[A340266[n], {n, 1, 49}] (* Robert P. P. McKone, Jan 29 2021 *)
    LinearRecurrence[{3,-3,1},{4,8,12,17},50] (* Harvey P. Dale, Oct 24 2021 *)
  • PARI
    a(n) = if (n==1, 4, n*(n+3)/2 + 3); \\ Michel Marcus, Jan 04 2021
  • Python
    print([4 if n == 1 else n  * (n + 3) // 2 + 3 for n in range(1, 50)])
    

Formula

a(1) = 4, a(n) = n*(n+3)/2 + 3 (if n > 1).
From Stefano Spezia, Jan 02 2021: (Start)
G.f.: x*(4 - 4*x + x^3)/(1 - x)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 4. (End)
a(n) = (A111802(n+2)+1)/2 + 2. - Hugo Pfoertner, Jan 02 2021

A334306 Number of distinct acyclic orientations of the edges of a three-dimensional n-sided prism with complete graphs as faces.

Original entry on oeis.org

60, 501, 58848, 3296790, 248516640, 24173031960, 2940529011840, 436606222187520, 77604399434419200, 16251945275067163200, 3957141527033037235200, 1107716943231412920806400, 353062303151154587659468800, 127059236390700005739355008000
Offset: 3

Author

Matthew Scroggs, Apr 22 2020

Keywords

Comments

Take the edge graph of an n-gonal prism and replace each of its 2-dimensional facets with a complete graph. The edges of this graph are then oriented so that no cycles are formed. a(n) is the number of different ways to do this with results that are not rotations of reflections of each other.
a(3) is the number of reference elements needed when using the finite element method for a 3-dimensional problem with hexahedral cells if the orientations of the mesh entities are derived from a low-to-high ordering of the vertex numbers.

Examples

			For n=3, the n-sided prism is a triangular prism. The faces of this are two triangles and three squares. Putting complete graphs on these faces gives the graph that consists of the edges of a triangular prism with diagonal edges added to the three square faces. a(3) is the number of acyclic orientations of this graph.
For n=4, the n-sided prism is a cube prism. The faces of this are six squares. Putting complete graphs on these faces gives the graph that consists of the edges of a cube with diagonal edges added to all six square faces (the "16-cell"). a(4) is the number of acyclic orientations of this graph.
		

Crossrefs

Cf. A334304.

Extensions

a(7)-a(16) from Andrew Howroyd, Apr 23 2020

A334304 Number of distinct acyclic orientations of the edges of an n-dimensional cube with complete graphs as facets.

Original entry on oeis.org

1, 1, 3, 501
Offset: 0

Author

Matthew Scroggs, Apr 22 2020

Keywords

Comments

Take the edge graph of an n-dimensional cube and replace each of its (n-1) dimensional facets with a complete graph. The edges of this graph are then oriented so that no cycles are formed. a(n) is the number of different ways to do this with results that are not rotations of reflections of each other.
For n<=3, a(n) is the number of reference elements needed when using the finite element method for an n-dimensional problem with tensor product cells if the orientations of the mesh entities are derived from a low-to-high ordering of the vertex numbers.

Examples

			For n=2, the n-dimensional cube is a square, and the (n-1)-dimensional facets are the edges of the square. Replacing the edges with complete graphs on 2 vertices does not change the graph.
There are 3 distinct (under rotations and reflections) acyclic orientations of the edges of this graph:
*->-*    *->-*    *-<-*
|   |    |   |    |   |
^   ^    ^   v    ^   v
|   |    |   |    |   |
*->-*    *->-*    *->-*
Therefore a(2) = 3.
For n=3, the n-dimensional cube is a cube, and the (n-1)-dimensional facets are the faces of the cube. Replacing the faces with complete graphs on 4 vertices gives the graph that is the edges of a cube with diagonal edges added to each face (the "16-cell"). a(3) is the number of distinct acyclic orientations of this graph.
		

Crossrefs

A334248 is the number of distinct acyclic orientations of a n-cube (without the addition of complete graphs). A000012 is the number of reference elements needed when using the finite element method for an n-dimensional problem with simplectic cells.

Formula

A334248(n) <= a(n) <= A000142(2^n).

A334247 Number of acyclic orientations of the edges of an n-dimensional cube.

Original entry on oeis.org

1, 2, 14, 1862, 193270310, 47171704165698393638
Offset: 0

Author

Matthew Scroggs, Apr 20 2020

Keywords

Comments

a(n) is the absolute value of the chromatic polynomial of the n-hypercube graph evaluated at -1.

Examples

			For n=2, there are 14 ways to orient the edges of a square without cycles (see links).
		

Crossrefs

Cf. A334248 is the number of acyclic orientations with rotations and reflections of the same orientation excluded.
Cf. A033815 (cross-polytope), A058809 (wheel), A338152 (demihypercube), A338153 (prism), A338154 (antiprism).

Programs

  • Maple
    with(GraphTheory): with(SpecialGraphs):
    a:= n-> abs(ChromaticPolynomial(HypercubeGraph(n), -1)):
    seq(a(n), n=0..4);  # Alois P. Heinz, Jan 14 2025

Formula

a(n) = Sum_{k=1..2^n} (-1)^(2^n-k) * k! * A334159(n, k). - Andrew Howroyd, Apr 21 2020
a(n) = |Sum_{k=0..2^n} (-1)^k * A334278(n, k)|. - Peter Kagey, Oct 13 2020

Extensions

a(5) from Andrew Howroyd, Apr 23 2020