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-3 of 3 results.

A352325 Number of ways of placing A352241(n) nonattacking black-square queens on an n X n board.

Original entry on oeis.org

1, 2, 5, 6, 8, 6, 10, 112, 104, 80, 40, 36, 2172, 1414, 984, 384, 240, 70396, 39400, 22468, 3696, 1152, 4457616, 2246138, 1060976, 185932
Offset: 1

Views

Author

Vaclav Kotesovec, Mar 12 2022

Keywords

Crossrefs

Extensions

a(20)-a(26) from Martin Ehrenstein, Mar 12 2022

A352426 Maximal number of nonattacking white-square queens on an n X n chessboard.

Original entry on oeis.org

0, 1, 1, 2, 4, 4, 4, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 13, 14, 15, 16, 17, 18, 18, 19, 20, 21, 21, 22, 23, 24, 25, 26, 26, 27, 28, 29, 29, 30, 31, 32, 33, 33, 34, 35, 36, 36, 37, 38, 39, 40, 40, 41, 42, 43, 44, 44, 45, 46, 47, 48, 48, 49, 50, 51, 51, 52, 53
Offset: 1

Views

Author

Martin Ehrenstein, Mar 16 2022

Keywords

Comments

Equivalently the maximal number of nonattacking black-square queens on an inverted n X n chessboard, that is a board with the a1 square white, the a2 and b1 squares black, etc.

Crossrefs

Programs

  • Python
    def fill(rows, queens, leftattack, notdownattack, rightattack, color):
        global c
        available = ~leftattack & notdownattack & ~rightattack & color
        if rows==1:
            if available==0:
                c[queens] = c.get(queens, 0) + 1
            else:
                c[queens+1] = c.get(queens+1, 0) + bin(available).count('1')
            return
        while available:
            attack = available & -available
            fill(rows-1, queens+1, (leftattack|attack)<<1, notdownattack&~attack, (rightattack|attack)>>1, ~color)
            available &= available - 1
        fill(rows-1, queens, leftattack<<1, notdownattack, rightattack>>1, ~color)
    print(' n a(n)    count')
    for n in range(1, 32):
        c=dict()
        fill(n, 0, 0, (1<
    				

Formula

a(2n) = A352241(2n).

Extensions

a(17)-a(24) from Vaclav Kotesovec, Mar 17 2022
a(25)-a(26) from Vaclav Kotesovec, Mar 20 2022
a(27) onwards from Andy Huchala, Mar 27 2024

A352599 Number of ways of placing A352426(n) nonattacking white-square queens on an n X n board.

Original entry on oeis.org

1, 2, 4, 6, 2, 6, 64, 112, 68, 80, 32, 36, 28, 1414, 576, 384, 40, 70396, 40896, 22468, 9808, 1152, 252, 2246138, 482272, 185932
Offset: 1

Views

Author

Martin Ehrenstein, Mar 22 2022

Keywords

Comments

Equivalently the number of ways of placing the maximal number of nonattacking black-square queens on an inverted n X n chessboard, that is a board with the a1 square white, the a2 and b1 squares black, etc.

Crossrefs

Cf. A352241 (maximal number for black-squares), A352325 (black-squares counts), A352426 (maximal number for white-squares), this sequence (white-squares counts).

Programs

Formula

a(2n) = A352325(2n).

Extensions

a(21)-a(24) from Vaclav Kotesovec, Mar 23 2022
a(25)-a(26) from Vaclav Kotesovec, Apr 01 2022
Showing 1-3 of 3 results.