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

A376737 a(n) is the denominator corresponding to A376736(n).

Original entry on oeis.org

1, 1, 3, 43, 167, 1017, 213488, 51901, 21578387, 106983448, 1524134453409, 212520825762723, 118603854051948819, 328857354494351169, 1131079058617495914656969, 35636007162246675331778279, 792054341291879335697891524219, 174615658931159537184638645409827, 407432375846003705593053861468274012573
Offset: 1

Views

Author

Hugo Pfoertner, Oct 03 2024

Keywords

Examples

			1/1, 1/1, 4/3, 62/43, 269/167, 1766/1017, 395497/213488, 101338/51901, ...
		

Crossrefs

A376736 are the corresponding numerators.

Programs

  • PARI
    \\ Uses function droprob from A376606 and definition of knightmoves from A376736
    a376737(n) = denominator(droprob(n, knightmoves, 8))

A376606 a(n) is the numerator of the expected number of moves to reach a position outside an nXn chessboard, starting in one of the corners, when performing a random walk with unit steps on the square lattice.

Original entry on oeis.org

1, 2, 11, 10, 99, 122, 619, 4374, 187389, 482698, 11031203, 33386106, 32723853563, 139832066, 150236161755, 633573154269934, 5755694771977, 189378719187729770, 509943025510535499, 6031948951257694364778, 1044408374351599765540157091, 27891966006517951087819226666
Offset: 1

Views

Author

Ruediger Jehn and Hugo Pfoertner, Oct 03 2024

Keywords

Comments

The moves are that of chess rook with moves of unit length or of a chess king restricted to the Von Neumann neighborhood (see A272763). The piece does not pay attention to its position and will fall off the board if it makes a move beyond the edge of the board.

Examples

			1, 2, 11/4, 10/3, 99/26, 122/29, 619/136, 4374/901, 187389/36562, 482698/89893, ...
Approximately 1, 2, 2.75, 3.333, 3.808, 4.207, 4.551, 4.855, 5.125, 5.370, 5.593, ...
		

Crossrefs

A376607 are the corresponding denominators.
A376609 and A376610 are similar for a chess king visiting the Moore neighborhood.
A376736 and A376737 are similar for a chess knight.

Programs

  • PARI
    droprob(n,moves=[[1,0],[0,1],[0,-1],[-1,0]], nmoves=4) = {my(np=n^2+1, M=matrix(np), P=1/nmoves); for(t=1, nmoves, for( i=1, n, my(ti=i+moves[t][1]); for(j=1,n,my(tj=j+moves[t][2]); my(m=(i-1)*n+j); if(ti<1 || ti>n || tj<1 || tj>n, M[m,np]+=P, my(mt=(ti-1)*n+tj); M[m,mt]+=P)))); vecsum((1/(matid(np)-M))[,1])};
    a376606(n) = numerator(droprob(n))

A376609 a(n) is the numerator of the expected number of random moves of a chess king to reach a position outside an nXn chessboard, starting in one of the corners.

Original entry on oeis.org

1, 8, 72, 46, 23747, 94968, 12161644, 158536576, 165181795263, 1779861954248, 60921563004721184, 136512657826472304, 38548316743830620183051, 581371653539561314, 2630585854108441990301102856, 120104329127347395409698056, 5092493809189909792181005355935991197, 6666722670813237580783418910187983288
Offset: 1

Views

Author

Hugo Pfoertner, Oct 03 2024

Keywords

Comments

The king visits the Moore neighborhood (see A272763). The piece does not pay attention to its position and will fall off the board if it makes a move beyond the edge of the board.

Examples

			1, 8/5, 72/35, 46/19, 23747/8723, 94968/31879, 12161644/3797647, 158536576/46627015, 165181795263/46174521031, ...
Approximately 1, 1.6, 2.057, 2.421, 2.722, 2.979, 3.202, 3.400, 3.577, 3.738, ...
		

Crossrefs

A376610 are the corresponding denominators.
A376606 and A376607 are similar for a rook walk with unit steps.
A376736 and A376737 are similar for a chess knight.

Programs

  • PARI
    \\ Uses function droprob from A376606
    kingmoves = [[1, 0], [0, 1], [0, -1], [-1, 0], [-1, -1], [-1, 1], [1, -1], [1, 1]];
    a376609(n) = numerator(droprob(n,kingmoves,8))

A377018 a(n) is the number of paths of a knight on square a1 to reach a position outside an 8 X 8 chessboard after n steps.

Original entry on oeis.org

6, 4, 32, 108, 880, 4420, 29560, 167068, 1041440, 6128772, 37298680, 222571260, 1343492128, 8055277508, 48487848472, 291196932444, 1751154444320, 10522542700868, 63258161555448, 380185630909692, 2285299322957920, 13735692739737604, 82562224208247576, 496247752160871132
Offset: 1

Views

Author

Ruediger Jehn, Oct 13 2024

Keywords

Comments

a(n)/8^n is the probability that the knight falls off the chess board at step n. The average number of steps it takes the knight to fall off the board is Sum_{n>0} n*a(n)/8^n = A376736(8)/A376737(8) = 101338/51901 or approximately 1.953 steps.
Because of the mirror symmetry of the problem to the board diagonal, all terms are even.

Examples

			a(2) = 4. Starting on square a1 there are 4 paths for a knight to leave the chess board in two steps: b3-z2, b3-z4, c2-b0 and c2-d0 (z being the file left of the a-file).
		

Crossrefs

Cf. A376736, A376737, A376837, A378902 (for a king).

Programs

  • Mathematica
    LinearRecurrence[{3, 27, -29, -162, 42, 276, 16, -96}, {6, 4, 32, 108, 880, 4420, 29560, 167068}, 24] (* Hugo Pfoertner, Oct 16 2024 *)
  • PARI
    Vec(2*(3 - 7*x - 71*x^2 + 39*x^3 + 390*x^4 + 94*x^5 - 484*x^6 - 240*x^7)/(1 - 3*x - 27*x^2 + 29*x^3 + 162*x^4 - 42*x^5 - 276*x^6 - 16*x^7 + 96*x^8) + O(x^30)) \\ Andrew Howroyd, Oct 16 2024

Formula

G.f.: 2*x*(3 - 7*x - 71*x^2 + 39*x^3 + 390*x^4 + 94*x^5 - 484*x^6 - 240*x^7)/(1 - 3*x - 27*x^2 + 29*x^3 + 162*x^4 - 42*x^5 - 276*x^6 - 16*x^7 + 96*x^8). - Andrew Howroyd, Oct 16 2024
a(n) ~ 0.10036158347592796... * 6.01066058303935...^n. - Ruediger Jehn, Nov 06 2024
Showing 1-4 of 4 results.