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: Natalia L. Skirrow

Natalia L. Skirrow's wiki page.

Natalia L. Skirrow has authored 5 sequences.

A383718 a(n) is the multinomial coefficient (length of n in binary) choose (the lengths of runs in n's binary expansion).

Original entry on oeis.org

1, 1, 2, 1, 3, 6, 3, 1, 4, 12, 24, 12, 6, 12, 4, 1, 5, 20, 60, 30, 60, 120, 60, 20, 10, 30, 60, 30, 10, 20, 5, 1, 6, 30, 120, 60, 180, 360, 180, 60, 120, 360, 720, 360, 180, 360, 120, 30, 15, 60, 180, 90, 180, 360, 180, 60, 20, 60, 120, 60, 15, 30, 6, 1
Offset: 0

Author

Natalia L. Skirrow, Apr 20 2025

Keywords

Examples

			2025_10 = 11111101001_2, with run lengths {6,1,1,2,1}; 11!/(6!*1!^3*2!) = 27720.
		

Crossrefs

Programs

  • Python
    from itertools import groupby
    from math import prod, factorial as fact
    rlenomial=lambda n: fact(l:=n.bit_length())//prod(map(lambda n: fact(len(list(n[1]))),groupby(map(lambda i: n>>i&1,range(l)))))

Formula

a(n) >= A368070(n), with equality iff n is in A023758. (In particular, if n' is formed by appending a bit to n's expansion, a(n')/A368070(n') >= a(n)/A368070(n).)
The ratio r = a(n)/A368070(n) reaches minima when n is in A000975; a(A000975(n)) = n!, whereas A368070(A000975(n)) = A000111(n+1).
As such, lim inf r = 0, but lim inf_{n>=m} log(a(n))/log(A368070(n)) is 1, converging as about 1 - log_{log_2(n)}(Pi/2)

A361870 Array read by downward antidiagonals: A(n,k) is the number of nonequivalent 2-colorings of the cells of an n-dimensional hypercube with edges k cells long under action of symmetry.

Original entry on oeis.org

2, 2, 1, 2, 2, 1, 2, 3, 2, 1, 2, 6, 6, 2, 1, 2, 10, 102, 22, 2, 1, 2, 20, 8548, 2852288, 402, 2, 1, 2, 36, 4211744, 384307306807269376, 6296489398464125698304, 1228158, 2, 1
Offset: 0

Author

Natalia L. Skirrow, May 28 2023

Keywords

Comments

A(0,0) = 2 by the convention that 0^0 = 1, in spirit with A003992.
A(n,2) = A000616(n), because the Boolean functions' truth tables are n-dimensional edge-length-2 hypercubes, and are considered equivalent under action of input permutation (transposition of dimensions) and applications of NOT to inputs (reflection in dimensions) that compose for the hypercube's symmetry group.
A(n,3) is the number of transitions in an isotropic non-totalistic Life-like cellular automaton with an n-dimensional Moore neighborhood.
A(n,k) ~ 2^(k^n)/(n!*2^n) for large k where n >= 1, and large n where k >= 2, and converges from above. Proof: When computing it with the Pólya enumeration theorem (for each action, count colorings of cycles under it instead of cells, average result over actions), the asymptotic form describes the number of states contributed by the identity action. Over k, the values contributed by the other actions are at most O(2^(k^n/2)), so the proportion that they contribute may be made arbitrarily small by choosing a large enough n. Over n, there are no more than n!*2^n such non-identity actions, assuming that they are all of order 2 (as an upper bound). Each one may have no more than a hyperplane (2^k^(n-1)) of fixed points, which (if it is of order 2) will multiply its colorings by 2^(k^(n-1)/2). The ratio of the identity term to the others is at least O(2^k^n/(n!*2^n*2^(k^(n-1)/2))), and its base-2 logarithm, by Stirling's approximation, is O(k^n-n*log(n)-n-k^(n-1)/2), so the 2^(k^n) term will dominate.
A(1,k) is the only row >= 1 that is linear-recurrent over k (and has a rational generating function), all other nontrivial rows and columns grow faster than any linear-recurrent function.
A000120(A(n,k)) is eventually periodic over k if and only if n <= 2.

Examples

			n\k|0, 1,       2,                      3,                  4,       5,  6, 7, ...
---+------------------------------------------------------------------------------
 0 |2, 2,       2,                      2,                  2,       2,  2, 2, ...
 1 |1, 2,       3,                      6,                 10,      20, 36, ...
 2 |1, 2,       6,                    102,               8548, 4211744, ...
 3 |1, 2,      22,                2852288, 384307306807269376, ...
 4 |1, 2,     402, 6296489398464125698304, ...
 5 |1, 2, 1228158, ...
 6 |1, 2, ...
 7 |1, ...
...
		

Crossrefs

Programs

  • Python
    from functools import reduce
    from itertools import accumulate
    from math import isqrt,lcm,factorial as fact
    tap=lambda f,*i:tuple(map(f,*i))
    redumulate=lambda f,l,i=None: accumulate(l,f,initial=i)
    expumulate=lambda f,l: lambda i: accumulate(range(l),lambda x,i: f(x),initial=i)
    factorise=lambda m: tuple(filter(lambda n: not m%n,range(1,m//2+1)))+(m,)
    def cycleLengths(dims,size):
        convert=(lambda m,i,a: (lambda d,n,i: ('('*bool(i)+str(size)+'+~(')*n+a+("//"+str(size**d))*bool(d)+('%'+str(size))*(dd for d,m in p[:i]))*fact(len(p)+~i)*2**dims+2**i*n for i,(e,n) in enumerate(p)))
        matrices=sorted((tuple((j,n>>i&1) for i,j in enumerate((lambda t: tuple(reduce(lambda e,n: e+(e>=n),t[i-1::-1],e)%dims for i,e in enumerate(t)))(tuple(a[0]%(dims-i) for i,a in enumerate(redumulate(lambda m,i: divmod(m[0],i),range(dims,1,-1),(m,0))))))) for m in range(fact(dims)) for n in range(2**dims)),key=matrindex) if dims else []
        exps=tap(lambda m: tap(matrindex,expumulate(lambda i: tap(lambda j: (lambda k,l: (k,l^j[1]))(*i[j[0]]),m),lcm(4,fact(dims)))(matrices[0])),matrices)
        lambdas=tap(lambda m: eval("lambda s: ["+','.join('s['+str(eval('+'.join(map(lambda i: convert(m,i,str(j)),range(dims)))))+']' for j in range(boardCells))+']'),matrices)
        test=list(range(1,boardCells+1))
        factors=tap(lambda e: factorise(e[1:].index(0)+1),exps)
        subperiods=tuple(tuple(sum(map(int._eq_,test,lambdas[exps[i][a]](test))) for a in f) for i,f in enumerate(factors))
        return((lambda t: tap(lambda t: reduce(lambda r,t: r+((t[0],t[1]-sum(i[1] for i in r if not t[0]%i[0])),),t,()),t))(tap(lambda a,b: tuple(zip(a,b)),factors,subperiods)))
    specific=(lambda cycles: int(bool(cycles) and sum(2**sum(i[1]//i[0] for i in c) for c in cycles)//len(cycles)))
    line=lambda k: (1,2)[k] if k<2 else 1<>1)
    A054247=lambda n: (1,2,6)[n] if n<3 else 1<>1)+3**(~n&1)<<(n**2-5>>1)|1<<(n**2-5>>2)
    cube=lambda k: (2**k**3+3*2**((k+1>>1)*k**2)+9*2**((k**2+1>>1)*k)+2**(k**3+1>>1)+6*2**(k**2*(k+1)>>1)+6*2**((k**2+3)//4*k)+6*2**((k**2+1>>1)*k+1>>1)+8*2**(k*(k**2+2)//3)+8*2**(k*(k**2+2)//3+1>>1))//48
    tesseract=lambda k: (2**k**4+4*2**((k+1>>1)*k**3)+30*2**((k**2+1>>1)*k**2)+16*2**((k**3+1>>1)*k)+2**(k**4+1>>1)+12*2**(k**3*(k+1)>>1)+12*2**((k**2+3>>2)*k**2)+48*2**(((k**2+1>>1)*k+1>>1)*k)+12*2**((k**2+1>>1)*k**2+1>>1)+32*2**(k**2*(k**2+2)//3)+32*2**((k+1>>1)*k*(k**2+2)//3)+32*2**((k*(k**2-1)//3+k+1>>1)*k)+32*2**(k**2*(k**2+2)//3+1>>1)+12*2**(k**2*(k**2+1)>>1)+12*2**(k**4+3>>2)+48*2**(k*(k**3+k+2)>>2)+48*2**(k**4+7>>3))//384
    nonequivalents=lambda n,k: (lambda k: 2,line,A054247,cube,tesseract)[n](k) if n<5 else 2**k if k<2 else specific(cycleLengths(n,k))
    A002262=(lambda n: (lambda s: (lambda o: (o,s-o))(n-s*(s+1)//2))(isqrt((n<<3)+1)-1>>1))
    print(tuple(map(lambda n: nonequivalents(*A002262(n)),range(28)))) # Natalia L. Skirrow, May 29 2023

Formula

Where an expression can be simplified by dividing a power of 2's coefficient by 2 and incrementing its exponent by 1, it is left as-is, so that the 2^ can be changed to c^ for general c-colorings.
A(n,2) = A000616(n).
A(0,k) = 2.
Herein, c(x) denotes the ceiling function.
A(1,k) = A005418(k+1) = (2^k + 2^c(k/2))/2.
A(2,k) = A054247(k) = (2^k^2 + 2*2^(k*(k+1)/2) + 2*2^(c(k/2)*k) + 2^c(k^2/2) + 2*2^c(k^2/4))/8.
A(3,k) = (2^k^3 + 3*2^(c(k/2)*k^2) + 9*2^(c(k^2/2)*k) + 2^c(k^3/2) + 6*2^(k^2*(k+1)/2) + 6*2^(c(k^2/4)*k) + 6*2^c(c(k^2/2)*k/2) + 8*2^(k*(k^2+2)/3) + 8*2^c(k*(k^2+2)/6))/48.
A(4,k) = (2^k^4 + 4*2^(c(k/2)*k^3) + 30*2^(c(k^2/2)*k^2) + 16*2^(c(k^3/2)*k) + 2^c(k^4/2) + 12*2^(k^3*(k+1)/2) + 12*2^(c(k^2/4)*k^2) + 48*2^(c(c(k^2/2)*k/2)*k) + 12*2^c((c(k^2/2)*k^2)/2) + 32*2^(k^2*(k^2+2)/3) + 32*2^(c(k/2)*k*(k^2+2)/3) + 32*2^(c((k*(k^2-1)/3+k)/2)*k) + 32*2^c((k^2*(k^2+2)/3)/2) + 12*2^(k^2*(k^2+1)/2) + 12*2^c(k^4/4) + 48*2^(k*(k^3+k+2)/4) + 48*2^c(k^4/8))/384.

A358339 Array read by antidiagonals upwards: A(n,k) is the number of nonequivalent positions in the KRvK endgame on an n X n chessboard with DTM (distance to mate) k, n >= 3, k >= 0.

Original entry on oeis.org

2, 4, 5, 3, 15, 9, 5, 10, 36, 13, 9, 51, 21, 70, 20, 5, 30, 122, 36, 120, 27, 4, 40, 59, 231, 55, 189, 35, 0, 26, 97, 101, 384, 78, 280, 44, 0, 30, 39, 181, 165, 587, 105, 396, 54, 0, 31, 87, 53, 311, 246, 846, 136, 540, 65, 0, 22, 79, 134, 67, 484, 356, 1167, 171, 715, 77
Offset: 3

Author

Natalia L. Skirrow, Nov 10 2022

Keywords

Comments

DTM (distance to mate) is measured in ply (half-moves), equivalence is under action of the square's symmetry group (D_4), however colors can't be swapped because one side always has a rook.
A225552(n) is the maximum value of k such that A(n,k)!=0, divided by 2 because it's in moves instead of ply (though each column seems to terminate at an even (losing) k, so perhaps no information is lost).
In each column, there are n-2 positions counted (in which the king without the rook is to move) that are orphans (with no predecessors), each represented by a horizontally-shifted version of the piece configuration (Ka1 - Kc2 Rc1) (in which the rook is blocked from having been moved downwards (to cause the check) by its king, that could not have exited from in front without having been adjacent to the king to move). Each one's DTM corresponds with the distance of the king to move from the corner in the opposite direction from the other king, DTM is 4 when on a1, 12 when on b1, 18 when on c1, 22 when on d1, 28 when on e1, and increasing by 2 for all thereafter.
Positions with the side with the king to move at a1, its rook at b1 and the opponent king at (ceiling(n/2),ceiling(n/2)) seem to be wins in 4*n - 6 + 2*floor((n+1)/2) - 2*floor(n/6).
.
For fixed values of n, all values A(n,k) with odd k (winning positions) seem to exceed A(n,k-1) and A(n,k+1) (losing positions) until a threshold value, beyond which this relationship inverts.
For all k, A(n,k)/Sum_{k>=0}(A(n,k)) is o(1) over n (for n>=A225552^(-1)(2*k)), so there is no k such that the polynomial eventually describing A(n,k) is of degree 6, and for all j, Sum_{k=0..j}(A(n,k)) is o(Sum_{k>=0}(A(n,k))).
For each k, there exists a polynomial eventually describing A(n,k) over n, though there can be arbitrarily many leading zero terms so it can take arbitrarily long to do so. Note that it is not necessarily an upper bound.
All polynomials for k >= 7 are quadratic.
.
Conjecture 1: If A(n+1,k) is nonzero, it is always greater than A(n,k).
Conjecture 2: As the increments to A225552 become periodic for n>24, so too do the differences between successive polynomials over n for each k>108, and for all j, Sum_{k=2*A225552(n)-j..2*A225552(n)}(A(n,k)) is o(Sum_{k>=0}(A(n,k))) (the same equation from the opposite side).
Conjecture 3: (Start)
Note that Sum_{k>=0}(A(n,k)-A(n-1,k)) ~ 3*n^5/2. (See FORMULA for the exact form.)
For all n, assuming conjecture 2, because the polynomials provide upper bounds and all are of degree <=5, it is necessary for the sum of all nonzero A(n,k)'s polynomials (for k<=2*A225552(n)) to have n^2 coefficients summing to 3*n^4/2.
A225552(n) ~ 7*n/3 (and seems to become periodic for n>24), so the number of elements added with each increment of n is ~ 14/3.
Thus, for n>24, the change of 3/2 to the sum of n^5 coefficients with each increment to n causes each new term's eventual polynomial to have an n^2 term with a coefficient asymptotic to (3/2)/(14/3)*n^2=9*n^2/28. (End)
Conjecture 4: The function o (defined in the FORMULA section), for each parity of k, contains only polynomials over n (without any terms with coefficients of n%2 or (-1)**n). For all m>=3, there exists a pair of polynomials over n (for even and odd k), such that when o adds them to the output of the k-specific fitting polynomial for n=k-m, the values returned are correct for all k>=5*(m-1). (Works for m=2,3,4.) Equivalently, for all k>10, while A(n,k) can be described exactly by a k-specific polynomial over n for all n>=A052928(k), it can be described exactly by the sum of that and a (2*k-n)-specific polynomial over n (or equivalently, over k) for all n>=k-1-floor(k/5).

Examples

			Array begins (transposed):
 k\n| 3  4    5     6     7     8   9      10   11 ...
----+---------------------------------------------
  0 | 2  5    9    14    20    27   35     44   54
  1 | 4 15   36    70   120   189  280    396  540
  2 | 3 10   21    36    55    78  105    136  171
  3 | 5 51  122   231   384   587  846   1167 1556
  4 | 9 30   59 | 101   165   246  356    487  655
  5 | 5 40 | 97   181   311   484  725   1023 1411
  6 | 4 26 | 39    53    67    81   95    109  123
  7 | 0 30   87 | 134   184   238  296    358  424
  8 | 0 31   79   116   156 | 198  246    298  354
  9 | 0 22  174   310 | 449   607  787    989 1213
 10 | 0 65  178   262   365   471  593 |  730  884
 11 | 0  7  180   492   795  1097 1434 | 1824 2260
...
(where vertical lines denote indexes at which the rows for fixed k begin to abide by polynomials)
The following diagrams are positions counted. Pieces with uppercase letters are next to move.
.
A(3,0)=2:
  |r   |r  |
  |    |  k|
  |K  k|K  |
.
A(3,1)=4:
  | R |R  |k  |k  |
  |   |   |  R|   |
  |K k|K k| K | KR|
.
A(3,2)=3:
  |k r| kr| k |
  |   |   |  r|
  | K | K | K |
.
A(3,3)=5:
  | R |R  |   | k | k |
  |  k|  k|  k|R  |   |
  |K  |K  |KR | K |RK |
.
A(3,4)=9:
  |  r| r |   |  r| r |   |   | rk|r k|
  |   |   |   |  k|  k|  k|  k|   |   |
  |K k|K k|Krk|K  |K  |K r|Kr |K  |K  |
.
A(3,5)=5:
  |   |   |  k|  k|k  |
  | R |R  | R |   | R |
  |K k|K k|K  |KR | K |
.
A(3,6)=4:
  |kr |k  |k  | k |
  |   | r |r  | r |
  | K | K | K | K |
		

Crossrefs

Nonzero column lengths: A225552, nonequivalent KvK positions: A357723.
Rows k=0..2: A000096(n-2), A077414(n-1), A014105(n-2).

Formula

Sum_{k>=0}(A(n,2*k)) = (n^6 - 19*n^4 + 27*n^3 + 93*n^2 - 242*n + 112 + (-n^3+7*n^2-18*n+16)*(-1)^n)/8. (losing/checkmated positions)
Sum_{k>=0}(A(n,2*k+1)) = (n-2)*(n-1)*(3*n^4 + 3*n^3 - 22*n^2 + 19*n - 15 + (3-n)*(-1)^n)/24. (winning positions)
Sum_{k>=0}(A(n,k)) = (6*n^6 - 6*n^5 - 82*n^4 + 172*n^3 + 163*n^2 - 643*n + 306 + (2-n)*(4*n^2 - 19*n + 27)*(-1)^n)/24.
Note that for n>=3, there are n+1 nonequivalent positions that are stalemates, each one with the king to move at a1 (under symmetry), 2 with the rook on b2 and its king on c2 or c3, and n-1 with the other at c1 and the rook in one of the squares on the second rank and file >= b.
There are also (n-2)*(4*n^3 + 2*n^2 - 43*n + 31 + (3-n)*(-1)^n)/4 positions in which the rook can be immediately captured (making it unwinnable) that are not included in the sequence, and A357723(n) in the resulting KvK endgame.
The winning positions are those in which the side with the rook is to move, but to get the number in which the side without the rook is to, adding the losing and stalemated positions yields (n-2)*(n^5 + 2*n^4 - 15*n^3 - 3*n^2 + 87*n - 60 - (n^2 - 5*n + 8)*(-1)^n)/8, then adding yields (n-2)*(n-1)*(n^4 + 3*n^3 - 4*n^2 - 3*n - 2 + (2-n)*(-1)^n)/8, so the equations for each side to move both have roots at n=1 and n=2.
In total, there are (n-2)*(n-1)*(6*n^4 + 12*n^3 - 34*n^2 + 10*n - 21 + (-4*n+9)*(-1)^n)/24 nonequivalent positions in the KRvK endgame.
Sum_{k>=0}(A(n,k)-A(n-1,k)) = (18*n^5 - 60*n^4 - 74*n^3 + 429*n^2 - 226*n - 282 + (-4*n^3 + 33*n^2 - 98*n + 102)*(-1)^n)/12.
.
The values of n at which each value of k begins to abide by a polynomial are ((2,1,2,4,6,5,5,6,8,7)[k] if k<10 else (floor(k/2)*2 = A052928(k))). This value can be changed (reduced for k>=10) to ((2,1,1,4,6,5,6,5,7,7,7,8,9,9,11,11,12,13,14,15)[k] if k<20 else k-5) by adding the output of the following function to each polynomial at each value (offsetting only 5-k%2 values):
define o(n,k):
.if k is odd:
..if n=k-2:
...add (n-1)/2-3
..else if n=k-3:
...add n-4
..else if n=k-4:
...add n^2-n-15
..else if n=k-5:
...add 3*n^2-(9*n+23)/2
.else:
..if k-n=1:
...add (n-1)/2-1
..else if n=k-2:
...add n-1
..else if n=k-3:
...add 4*n-15
..else if n=k-4:
...add 8*n-35
..else if n=k-5:
...add (25*n-137)/2
.
A(n, k) = 0 if n<3 or k>2*A225552(n).
The sequence measures distance to mate, as is convention in chess (so A(n,0) counts positions in checkmate), however if kings were to be allowed to be captured, the number of positions after a move into check from a position in checkmate (usually considered illegal) would be
A(n,-1) = (n-1)*(6*n^4 + 22*n^3 - 60*n^2 + 59*n - 24 + (n-2*n^2)*(-1)^n)/24
(note that (n-1)*(4*n + 1 - (-1)^n)/4 of these cases have the rook captured)
A(n, 0) = 0 if n<2 else (n-2)*(n+1)/2 = n^2/2 - n/2 - 1 = A000096(n-2).
A(n, 1) = 0 if n<1 else (n-2)*(n-1)*(n+1)/2 = n^3/2 - n^2 - n/2 + 1 = A077414(n-1).
A(n, 2) = 0 if n<2 else (n-2)*(2*n-3) = 2*n^2 - 7*n + 6 = A014105(n-2).
A(n, 3) = (0,0,0,5)[n] if n<4 else n^3 + 4*n^2 - 26*n + 27 = m^3 - 94*m/3 + 1793/27, where m = n + 4/3.
A(n, 4) = (0,0,0,9,30,59)[n] if n<6 else (2*n^3 - 5*n + 5 + (3-n)*(-1)^(n))/4
A(n, 5) = (0,0,0,5,40)[n] if n<5 else (6*n^3 - 26*n^2 + 84*n - 135 + (7-2*n)*(-1)^n)/4 = 3*m^3/2 + 209*m/18 - 12109/972 + (m/2-37/36)*(-1)^n, where m = n - 13/9.
A(n, 6) = (0,0,0,4,26)[n] if n<5 else 14*n - 31.
A(n, 7) = (0,0,0,0,30, 87)[n] if n<6 else 2*n^2 + 24*n - 82.
A(n, 8) = (0,0,0,0,31, 79,116)[n] if n<7 else 2*n^2 + 14*n - 42 + o().
A(n, 9) = (0,0,0,0,22,174,310)[n] if n<7 else 11*n^2 - 7*n - 41.
A(n,10) = (0,0,0,0,65,178,262)[n] if n<7 else 7*n^2 + 7*n - 40 + o(n,10).
A(n,11) = (0,0,0,0, 7,180,492, 795)[n] if n<8 else 45*n^2/2 - 73*n/2 - 61 + o(n,11).
A(n,12) = (0,0,0,0,25,206,291, 449, 592)[n] if n<9 else 9*n^2 + 7*n - 64 + o(n,12).
A(n,13) = (0,0,0,0, 2,125,461,1002,1418)[n] if n<9 else (53*n^2 - 75*n)/2 - 58 + o(n,13).
A(n,14) = (0,0,0,0, 6,243,397, 552, 683, 805, 939)[n] if n<11 else (7*n^2 + 141*n)/2 - 160 + o(n,14).
A(n,15) = (0,0,0,0, 0, 49,447,1147,2149,2950,3709)[n] if n<11 else (91*n^2 - 205*n)/2 - 44 + o(n,15).
A(n,16) = (0,0,0,0, 0,136,619, 986,1433,1836,2254,2559)[n] if n<12 else (39*n^2 + 47*n)/2 - 134 + o(n,16).
A(n,17) = (0,0,0,0, 0, 19,473,1303,2514,4166,5703,6973,8306)[n] if n<13 else (139*n^2 - 341*n)/2 - 16 + o(n,17).
A(n,18) = (0,0,0,0, 0, 70,698,1207,1712,2376,3075, 3578, 4197, 4690)[n] if n<14 else (49*n^2 + 97*n)/2 - 179 + o(n,18).
A(n,19) = (0,0,0,0, 0, 2,292,1154,2382,4296,6722, 8563,10691,12530,14445)[n] if n<15 else (171*n^2 - 389*n)/2 - 94 + o(n,19).
A(n,20) = (0,0,0,0, 0, 7,782,1515,1985,2624,3532, 4518, 5466, 6308, 7261)[n] if n<15 else 34*n^2 + 42*n - 302 + o(n,20).
A(n,21) = (0,0,0,0, 0, 0, 96,1124,2565,4341,7182,10310,13031,15307,18270,20921)[n] if n<16 else 106*n^2 - 262*n + 6 + o(n,21).
A(n,22) = (0,0,0,0, 0, 0,313,2116,2854,3322,4186, 5212, 6278, 7313, 8479, 9494,10681)[n] if n<17 else 35*n^2 + 106*n - 358 + o(n,22).
A(n,23) = (0,0,0,0, 0, 0, 13, 832,2691,5011,7578,11884,16461,19759,23062,26187,30474,34401)[n] if n<18 else 133*n^2 - 306*n - 194 + o(n,23).
A(n,24) = (0,0,0,0, 0, 0, 45,2002,3597,5172,6558, 7114, 8891,10534,11965,13623,15618,17470,19443)[n] if n<19 else (109*n^2 + 223*n)/2 - 687 + o(n,24).
A(n,25) = (0,0,0,0, 0, 0, 0, 258,2234,5482,9412,13305,20056,25698,30163,33982,39027,43570,49523,55256) if n<20 else (345*n^2 - 931*n)/2 + 60 + o(n,25).
A(n,26) = (0,0,0,0, 0, 0, 0, 773,4194,6209,8937,10557,12341,13901,15940,18224,20672,23119,25666,28471,31426) if n<21 else 75*n^2 + 73*n - 589 + o(n,26).

A357740 Number of non-equivalent ways under symmetry in one axis that 2 non-attacking kings of different colors can be placed on an n X n board.

Original entry on oeis.org

0, 0, 17, 78, 234, 520, 1035, 1806, 2996, 4608, 6885, 9790, 13662, 18408, 24479, 31710, 40680, 51136, 63801, 78318, 95570, 115080, 137907, 163438, 192924, 225600, 262925, 303966, 350406, 401128, 458055, 519870, 588752, 663168, 745569, 834190, 931770, 1036296, 1150811, 1273038
Offset: 1

Author

Natalia L. Skirrow, Oct 11 2022

Keywords

Comments

The number of king positions over which you iterate when making tablebases of positions containing pawns, wherein it is only equivalent under reflection in the x axis.

Examples

			For n=3, the a(3)=17 solutions are
   |   |  K|   |   |  K|k  |k  |k K| K |K  |K  | K |k  |k  | k | k |
   |  K|   |k  |k K|k  |   |  K|   |   |   |   |   |   |   |   |   |
k K|k  |k  |  K|   |   |  K|   |   |k  |k  | k | k | K |K  |K  | K |
		

Crossrefs

Cf. A035286 (no symmetry), A357723 (8-fold symmetry).

Programs

  • PARI
    a(n) = {(n-2)*(n-1)*((n+3)*n - 2 + (n % 2))/2} \\ Andrew Howroyd, Dec 31 2022
  • Python
    a=(lambda n: (n-2)*(n-1)*((n+3)*n-2+n%2)//2)
    

Formula

a(n) = n^4/2 - 4*n^2 + (9/2)*n - 1 if n is odd else n^4/2 - (9/2)*n^2 + 6*n - 2;
a(n) = n^4/2 - (17/4)*n^2 + (21/4)*n - 3/2 + (-1)^n*(-(1/4)*n^2 + (3/4)*n - 1/2);
a(n) = 2*a(n-1) + 2*a(n-2) - 6*a(n-3) + 6*a(n-5) - 2*a(n-6) - 2*a(n-7) + a(n-8);
a(n) = (n-2)*(n-1)*((n+3)*n - 2 + (n mod 2))/2.
G.f.: x^3*(17 + 44*x + 44*x^2 - 2*x^3 - 5*x^4 - 2*x^5)/((1 - x)^5*(1 + x)^3). - Andrew Howroyd, Dec 31 2022
E.g.f.: 2+(e^x*(2*x^4 + 12*x^3 - 3*x^2 + 6*x - 6) - e^(-x)*(x^2 + 2*x + 2))/4 = (cosh(x)*(x^4 + 6*x^3 - 2*x^2 + 2*x - 4) + sinh(x)*(x^4 + 6*x^3 - x^2 + 4*x - 2))/2 + 2.

A357723 Number of ways to place a non-attacking black king and white king on an n X n board, up to rotation and reflection.

Original entry on oeis.org

0, 0, 0, 5, 21, 63, 135, 270, 462, 770, 1170, 1755, 2475, 3465, 4641, 6188, 7980, 10260, 12852, 16065, 19665, 24035, 28875, 34650, 40986, 48438, 56550, 65975, 76167, 87885, 100485, 114840, 130200, 147560, 166056, 186813, 208845, 233415, 259407, 288230, 318630
Offset: 0

Author

Natalia L. Skirrow, Oct 10 2022

Keywords

Comments

Rotations and reflections of placements are not counted. (If they were then see A035286.)
a(8)=462 is the number of states in the KvK endgame in an eightfold-reducing chess tablebase on 8 X 8 boards.
When kings are unlabeled, see A279111. The ratio a(n)/A279111(n) is bounded in the interval [1, 2] and converges to 2, because the number of placements in which the kings' positions can be swapped by an automorphism is O(n^2), while the sequence itself is O(n^4).
When there are pawns on the board and the position is only equivalent under reflection in the x axis, see A357740.
A quasipolynomial of degree 4 and period 2. - Charles R Greathouse IV, Feb 02 2023

Examples

			For n=3, the a(3) = 5 solutions are
  ...  ...  ..b  b..  .b.
  ...  ..b  ...  ...  ...
  w.b  w..  w..  .w.  .w.
		

Crossrefs

Programs

  • PARI
    a(n)=(n-2)*(n-1)*(n^2+3*n+n%2*2)\8 \\ Charles R Greathouse IV, Feb 02 2023
  • Python
    a=(lambda n: ((n-2)*(n-1)*(n**2+3*n+n%2*2)//8))
    

Formula

a(n) = n^4/8 - (5/8)*n^2 + 1/2 if n is odd, else n^4/8 - (7/8)*n^2 + (3/4)*n.
a(n) = 2*a(n-1) + 2*a(n-2) - 6*a(n-3) + 6*a(n-5) - 2*a(n-6) - 2*a(n-7) + a(n-8).
a(n) = n^4/8 - (3/4)*n^2 + (3/8)*n + 1/4 + (-(1/8)*n^2 + (3/8)*n - 1/4)*(-1)^n.
a(n) = (n^4 + (2*(n mod 2)-7)*n^2 + 6*(1-(n mod 2))*n + (n mod 2)*4)/8.
a(n) = (n-2)*(n-1)*(n^2 + 3*n + 2*(n mod 2))/8.
G.f.: x^3*(3*x^3 - 11*x^2 - 11*x - 5)/((x+1)^3*(x-1)^5).
E.g.f.: (x*(x^3 + 6*x^2 - 4)*cosh(x) + (x^4 + 6*x^3 + 2*x^2 + 4)*sinh(x))/8. - Stefano Spezia, Jan 28 2023