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

A374935 Maximum number of squares covered (i.e., attacked) by 5 independent (i.e., nonattacking) queens on an n X n chessboard.

Original entry on oeis.org

25, 36, 49, 64, 81, 100, 121, 134, 153, 172, 193, 212, 233, 252
Offset: 5

Views

Author

John King, Aug 08 2024

Keywords

Examples

			5 X 5; 6 X 6; 7 X 7; 8 X 8;  Center-square +4Queens separated as if 1,2 knights.
              at 11 X 11 and beyond this pattern seems to be 'best'.
  x x x x x x x x
  x x x x x x x x
  x x Q x x x x x
  x x x x x Q x x
  x x x Q x x x x
  x Q x x x x x x
  x x x x Q x x x
  x x x x x x x x
9 X 9; 10 X 10; 11 X 11; Center-square +4Queens separated as 2,4 knights.
  x x x x x x x x x x x
  x x x x x x x Q x x x
  x x x x x x x x x x x
  x Q x x x x x x x x x
  x x x x x x x x x x x
  x x x x x Q x x x x x
  x x x x x x x x x x x
  x x x x x x x x x Q x
  x x x x x x x x x x x
  x x x Q x x x x x x x
  x x x x x x x x x x x
		

Crossrefs

Extensions

Unverified a(19) removed by Andrew Howroyd, Oct 05 2024

A374936 Maximum number of squares covered (i.e., attacked) by 6 independent (i.e., nonattacking) queens on an n X n chessboard.

Original entry on oeis.org

36, 49, 64, 81, 100, 121, 142, 165, 186, 209, 231, 255, 277
Offset: 6

Views

Author

John King, Aug 08 2024

Keywords

Examples

			Example for 12 X 12: There are 2 cells marked 'o' or uncovered thus a(12) = 12 * 12 - 2 = 142.
  x x x x x x x x x x x Q
  x x x x x x x x x x x x
  x x x x x x x x x x x x
  x x x Q x x x x x x x x
  x x x x x Q x x x x x x
  x x x x x x x Q x x x x
  x x x x Q x x x x x x x
  x x x x x x Q x x x x x
  o x x x x x x x x x x x
  x x x x x x x x x x x x
  x x x x x x x x x x x x
  x x x x x x x x o x x x
From _Christian Sievers_, Sep 08 2024: (Start)
Example for 14 X 14 with 186 attacked squares (unattacked ones marked with "+"):
  . . Q . . . . . . . . . . .
  . . . . . . . . . Q . . . .
  . . . . . . . . . . . . . +
  . + . . . . . . . . . . . .
  . . . Q . . . . . . . . . .
  . . . . . . . . . . . . . .
  . . . . . . . . . . . . . .
  . . . . . . . . . . . . Q .
  . + . . . . . . . . . . . .
  . . . . . . . . . . . . . +
  . . . . . . Q . . . . . . .
  . + . . + . . . . . . + . .
  . . . . . + . . . . + . . +
  Q . . . . . . . . . . . . .
(End)
		

Crossrefs

Extensions

a(14) corrected and a(15) confirmed by Christian Sievers, Sep 08 2024
a(16)-a(18) added using data from Mia Muessig by Andrew Howroyd, Oct 05 2024

A375116 Maximum number of squares covered (i.e., attacked) by 3 independent (i.e., nonattacking) queens on an n X n chessboard.

Original entry on oeis.org

16, 25, 35, 45, 55, 66, 77, 88, 101, 112, 125, 136, 149, 160, 173, 184, 197, 208, 221, 232, 245, 256, 269, 280, 293, 304, 317, 328, 341, 352, 365, 376, 389, 400, 413, 424, 437, 448, 461, 472, 485, 496, 509, 520, 533, 544, 557, 568, 581, 592, 605, 616, 629, 640, 653, 664, 677
Offset: 4

Views

Author

John King, Jul 30 2024

Keywords

Comments

It is not possible to place 3 independent queens on a 1 X 1 or 2 X 2 or 3 X 3 board.
There is a related sequence of 'uncovered' squares i.e., n^2 - a(n).
There is another sequence denoting the potency of the new queen a(n) - A374933(n).

Examples

			4 X 4 complete coverage with 3 queens
  x x x x
  x Q x x
  x x x Q
  Q x x x
5 X 5 complete coverage with 3 queens
  Q x x x x
  x x x x x
  x x x Q x
  x x x x x
  x x Q x x
6 X 6 incomplete 1 o/s
  x x x x o x
  Q x x x x x
  x x x x x Q
  x x x x x x
  x x Q x x x
  x x x x x x
6 X 6 coverage complete but NOT independent
  Q x x x x x
  x x x x x x
  x x x x q x
  x x x x x x
  x x q x x x
  x x x x x x
7 X 7 best leaves 4 o/s  (same layout as 6 X 6 with extra row and column)
There are alternative layouts - how many is not identified.
  x x x x o x x
  Q x x x x x x
  x x x x x Q x
  x x x x x x x
  x x Q x x x x
  x x x x x x o
  x x x o x x o
		

Crossrefs

Column 3 of A376732.
Cf. A047461 (for one queen), A374933 (for two queens), A374934, A374935, A374936.

Formula

a(n) = 12*n - 43 - (n mod 2) for n >= 10.

Extensions

a(6)-a(8) corrected by John King, Sep 17 2024
a(9) corrected using data from Mia Muessig by Andrew Howroyd, Oct 05 2024

A047415 Numbers that are congruent to {1, 3, 4, 6} mod 8.

Original entry on oeis.org

1, 3, 4, 6, 9, 11, 12, 14, 17, 19, 20, 22, 25, 27, 28, 30, 33, 35, 36, 38, 41, 43, 44, 46, 49, 51, 52, 54, 57, 59, 60, 62, 65, 67, 68, 70, 73, 75, 76, 78, 81, 83, 84, 86, 89, 91, 92, 94, 97, 99, 100, 102, 105, 107, 108, 110, 113, 115, 116, 118, 121, 123, 124
Offset: 1

Views

Author

Keywords

Comments

Consider an operation SS(n) defined for a specific sequence b where b(n) is the n-th term of b. This operation is defined as follows: SS(1) = b(1); if b(n+1) > SS(n), SS(n+1) = SS(n) + b(n+1), otherwise SS(n+1) = SS(n) - b(n+1) (If b(n) = A000027(n), then SS(n) = A008344(n+1)). If the sequence b can represent any permutation of the first n natural numbers, then a(n) is the maximum possible value of SS(n). - Iain Fox, Sep 15 2020 (see link by Math StackExchage)

Crossrefs

Programs

Formula

G.f.: x*(1+x+2*x^3) / ( (1+x^2)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
a(n) = 2*(n-1)-(i^(n*(n+1))-1)/2, where i=sqrt(-1). - Bruno Berselli, Dec 06 2011
From Wesley Ivan Hurt, May 31 2016: (Start)
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4.
a(n) = (1+i)*(4*n-4*n*i+3*i-3+i^(1-n)-i^n)/4 where i=sqrt(-1).
a(2*k) = A047398(k), a(2*k-1) = A047461(k). (End)
E.g.f.: (4 + sin(x) - cos(x) + (4*x - 3)*exp(x))/2. - Ilya Gutkovskiy, May 31 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = 3*Pi/16 - (sqrt(2)+1)*log(2)/8 + sqrt(2)*log(sqrt(2)+2)/4. - Amiram Eldar, Dec 24 2021

A153125 Triangle read by rows: T(n,k) = maximal number of squares that can be covered by a queen on an n X k chessboard, 1<=k<=n.

Original entry on oeis.org

1, 2, 4, 3, 6, 9, 4, 7, 10, 12, 5, 8, 11, 14, 17, 6, 9, 12, 15, 18, 20, 7, 10, 13, 16, 19, 22, 25, 8, 11, 14, 17, 20, 23, 26, 28, 9, 12, 15, 18, 21, 24, 27, 30, 33, 10, 13, 16, 19, 22, 25, 28, 31, 34, 36, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 12, 15, 18, 21, 24, 27, 30, 33, 36
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 20 2008

Keywords

Comments

Sums of rows give A153126; central terms give A016861;
A047461(n) = T(n,n);
T(n,2*k-1) = T(n-1,2*k-1) + 1 for 2*k-1

Examples

			Triangle T(n,k) begins:
1;
2,  4;
3,  6,  9;
4,  7, 10, 12;
5,  8, 11, 14, 17;
6,  9, 12, 15, 18, 20;
7, 10, 13, 16, 19, 22, 25;
8, 11, 14, 17, 20, 23, 26, 28;
		

Programs

  • Mathematica
    T[n_,k_]:=n+3*(k-1)-(1-Mod[n,2])*If[k==n,1,0];
    Flatten[Table[Table[T[n,k],{k,1,n}],{n,1,20}]]
    (* From Vaclav Kotesovec, Sep 07 2012 *)

Formula

T(n,k) = n + 3*(k-1) - (1 - n Mod 2)*delta_{n,k}, 1<=k<=n; delta is the Kronecker symbol.

A279406 Irregular triangle read by rows: T(n,k) (n>=1, 0 <= k <= n^2) = minimal number of squares attacked by k queens on an n X n toroidal board.

Original entry on oeis.org

0, 1, 0, 4, 4, 4, 4, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 0, 12, 14, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 0, 17, 22, 23, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 0, 20, 26, 30, 30, 32, 32, 34, 34, 34
Offset: 1

Author

Andrey Zabolotskiy, Dec 11 2016

Keywords

Comments

A279405(n) is maximal m such that T(n,m) >= m.
Generally, T(n,k') <= n^2-k if and only if T(n,k) <= n^2-k'.

Examples

			The triangle begins:
0 1
0 4 4 4 4
0 9 9 9 9 9 9 9 9 9
0 12 14 15 15 16 16 16 16 16 16 16 16 16 16 16 16
		

Formula

T(n,0) = 0.
T(n,k) = A000290(n) for k > A000290(n) - T(n,1).
T(n,1) = A047461(n) = A000290(n) - A279403(n,1).

A047466 Numbers that are congruent to {0, 1, 2, 4} mod 8.

Original entry on oeis.org

0, 1, 2, 4, 8, 9, 10, 12, 16, 17, 18, 20, 24, 25, 26, 28, 32, 33, 34, 36, 40, 41, 42, 44, 48, 49, 50, 52, 56, 57, 58, 60, 64, 65, 66, 68, 72, 73, 74, 76, 80, 81, 82, 84, 88, 89, 90, 92, 96, 97, 98, 100, 104, 105, 106, 108, 112, 113, 114, 116, 120, 121, 122
Offset: 1

Keywords

Crossrefs

Essentially the same as A003485.

Programs

  • Magma
    [n: n in [0..120] | n mod 8 in [0,1,2,4]];
    
  • Maple
    A047466:=n->2*n-4+(3-I^(2*n))*(1-I^(n*(n+1)))/4: seq(A047466(n), n=1..100); # Wesley Ivan Hurt, Jun 01 2016
  • Mathematica
    Select[Range[0,120], MemberQ[{0, 1, 2, 4}, Mod[#, 8]] &] (* or *) LinearRecurrence[{1, 0, 0, 1, -1}, {0, 1, 2, 4, 8}, 60] (* Bruno Berselli, Jul 18 2012 *)
  • Maxima
    makelist(2*n-4+(3-(-1)^n)*(1-%i^(n*(n+1)))/4,n,1,60);
    
  • PARI
    concat(0, Vec((1+x+2*x^2+4*x^3)/((1+x)*(1+x^2)*(1-x)^2)+O(x^60))) (End)

Formula

G.f.: x^2*(1+x+2*x^2+4*x^3) / ( (1+x)*(1+x^2)*(1-x)^2 ). - R. J. Mathar, Oct 08 2011
a(n) = 2*n-4+(3-(-1)^n)*(1-i^(n*(n+1)))/4, where i=sqrt(-1). - Bruno Berselli, Jul 18 2012
From Wesley Ivan Hurt, Jun 01 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(2k) = A047461(k), a(2k-1) = A047467(k). (End)
Sum_{n>=2} (-1)^n/a(n) = (1+2*sqrt(2))*Pi/32 + (3+sqrt(2))*log(2)/16 - sqrt(2)*log(2-sqrt(2))/8. - Amiram Eldar, Dec 20 2021

A047541 Numbers that are congruent to {1, 2, 4, 7} mod 8.

Original entry on oeis.org

1, 2, 4, 7, 9, 10, 12, 15, 17, 18, 20, 23, 25, 26, 28, 31, 33, 34, 36, 39, 41, 42, 44, 47, 49, 50, 52, 55, 57, 58, 60, 63, 65, 66, 68, 71, 73, 74, 76, 79, 81, 82, 84, 87, 89, 90, 92, 95, 97, 98, 100, 103, 105, 106, 108, 111, 113, 114, 116, 119, 121, 122, 124
Offset: 1

Keywords

Crossrefs

Programs

  • Magma
    [n : n in [0..150] | n mod 8 in [1, 2, 4, 7]]; // Wesley Ivan Hurt, Jun 04 2016
  • Maple
    A047541:=n->(1+I)*(n*(4-4*I)+3*I-3+I^(-n)-I^(1+n))/4: seq(A047541(n), n=1..100); # Wesley Ivan Hurt, Jun 04 2016
  • Mathematica
    Table[(1+I)*(n*(4-4*I)+3*I-3+I^(-n)-I^(1+n))/4, {n, 80}] (* Wesley Ivan Hurt, Jun 04 2016 *)
    Select[Range[200],MemberQ[{1,2,4,7},Mod[#,8]]&] (* or  *) LinearRecurrence[ {2,-2,2,-1},{1,2,4,7},70] (* Harvey P. Dale, Jul 09 2020 *)
  • PARI
    a(n)=n\4*8+[-1,1,2,4][n%4+1] \\ Charles R Greathouse IV, Nov 04 2011
    

Formula

From Wesley Ivan Hurt, Jun 04 2016: (Start)
G.f.: x*(1+2*x^2+x^3)/(x-1)^2*(1+x^2).
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - a(n-4) for n>4.
a(n) = (1+i)*(n*(4-4*i)+3*i-3+i^(-n)-i^(1+n))/4 where i=sqrt(-1).
a(2k) = A047524(k), a(2k-1) = A047461(k). (End)
E.g.f.: (2 + sin(x) + cos(x) + (4*x - 3)*exp(x))/2. - Ilya Gutkovskiy, Jun 04 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = (2*sqrt(2)+1)*Pi/16 - log(2)/8. - Amiram Eldar, Dec 24 2021

A047613 Numbers that are congruent to {1, 2, 4, 5} mod 8.

Original entry on oeis.org

1, 2, 4, 5, 9, 10, 12, 13, 17, 18, 20, 21, 25, 26, 28, 29, 33, 34, 36, 37, 41, 42, 44, 45, 49, 50, 52, 53, 57, 58, 60, 61, 65, 66, 68, 69, 73, 74, 76, 77, 81, 82, 84, 85, 89, 90, 92, 93, 97, 98, 100, 101, 105, 106, 108, 109, 113, 114, 116, 117, 121, 122, 124
Offset: 1

Keywords

Crossrefs

Programs

  • Magma
    [n: n in [1..120] | n mod 8 in [1,2,4,5]];
    
  • Maple
    A047613:=n->2*n-2-(I^(2*n)+I^(n*(n+1)))/2: seq(A047613(n), n=1..100); # Wesley Ivan Hurt, Jun 02 2016
  • Mathematica
    Select[Range[120], MemberQ[{1, 2, 4, 5}, Mod[#, 8]] &] (* or *) LinearRecurrence[{1, 0, 0, 1, -1}, {1, 2, 4, 5, 9}, 60] (* Bruno Berselli, Jul 17 2012 *)
  • Maxima
    makelist(2*n-2-((-1)^n+%i^(n*(n+1)))/2,n,1,60);
    
  • PARI
    Vec((1+x+2*x^2+x^3+3*x^4)/((1+x)*(1-x)^2*(1+x^2))+O(x^60)) (End)

Formula

From Bruno Berselli, Jul 17 2012: (Start)
G.f.: x*(1+x+2*x^2+x^3+3*x^4)/((1+x)*(1-x)^2*(1+x^2)).
a(n) = 2*n-2-((-1)^n+i^(n*(n+1)))/2, where i=sqrt(-1). (End)
From Wesley Ivan Hurt, Jun 02 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(2k) = A047617(k), a(2k-1) = A047461(k). (End)
E.g.f.: (6 + sin(x) - cos(x) + (4*x - 3)*sinh(x) + (4*x - 5)*cosh(x))/2. - Ilya Gutkovskiy, Jun 02 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = (2*sqrt(2)-1)*Pi/16 + sqrt(2)*log(sqrt(2)+2)/4 - (sqrt(2)+1)*log(2)/8. - Amiram Eldar, Dec 23 2021

A128622 Triangle T(n, k) = A128064(unsigned) * A128174, read by rows.

Original entry on oeis.org

1, 1, 2, 3, 2, 3, 3, 4, 3, 4, 5, 4, 5, 4, 5, 5, 6, 5, 6, 5, 6, 7, 6, 7, 6, 7, 6, 7, 7, 8, 7, 8, 7, 8, 7, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 9, 10, 9, 10, 9, 10, 9, 10, 9, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 10, 11, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12, 11, 12
Offset: 1

Author

Gary W. Adamson, Mar 14 2007

Keywords

Examples

			First few rows of the triangle are:
  1;
  1, 2;
  3, 2, 3;
  3, 4, 3, 4;
  5, 4, 5, 4, 5;
  5, 6, 5, 6, 5, 6;
  7, 6, 7, 6, 7, 6, 7;
  ...
		

Crossrefs

Cf. A000326 (diagonal sums), A014848 (row sums), A319556 (alternating row sums).

Programs

  • Magma
    [n - ((n+k) mod 2): k in [1..n], n in [1..16]]; // G. C. Greubel, Mar 14 2024
    
  • Mathematica
    Table[n - Mod[n+k,2], {n,16}, {k,n}]//Flatten (* G. C. Greubel, Mar 14 2024 *)
  • SageMath
    flatten([[n - ((n+k)%2) for k in range(1,n+1)] for n in range(1,16)]) # G. C. Greubel, Mar 14 2024

Formula

T(n, k) = abs(A128064(n,k) * A128174(n, k), as infinite lower triangular matrices.
Sum_{k=1..n} T(n, k) = A014848(n) (row sums).
From G. C. Greubel, Mar 14 2024: (Start)
T(n, k) = n - (1 - (-1)^(n+k))/2 = n - (n+k mod 2).
T(n, 1) = A109613(n+1).
T(n, n) = A000027(n).
T(2*n-1, n) = A042963(n).
T(3*n-1, n) = A016777(n+1).
T(4*n-3, n) = A047461(n).
Sum_{k=1..n} (-1)^(k-1)*T(n, k) = A319556(n).
Sum_{k=1..floor((n+1)/2)} T(n-k+1, k) = A000326(floor((n+1)/2)).
Sum_{k=1..floor((n+1)/2)} (-1)^(k-1)*T(n-k+1, k) = A123684(floor((n+1)/2)). (End)

Extensions

More terms added by G. C. Greubel, Mar 14 2024
Previous Showing 11-20 of 27 results. Next