Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #12 Oct 04 2024 08:52:04
%S 1,2,11,10,99,122,619,4374,187389,482698,11031203,33386106,
%T 32723853563,139832066,150236161755,633573154269934,5755694771977,
%U 189378719187729770,509943025510535499,6031948951257694364778,1044408374351599765540157091,27891966006517951087819226666
%N 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.
%C 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.
%H Hugo Pfoertner, <a href="/A376606/b376606.txt">Table of n, a(n) for n = 1..45</a>
%H Hugo Pfoertner, <a href="/plot2a?name1=A376606&name2=A376607&tform1=untransformed&tform2=untransformed&shift=0&radiop1=ratio&drawpoints=true">Plot of A376606(n)/A376607(n) vs n</a>, using Plot 2.
%e 1, 2, 11/4, 10/3, 99/26, 122/29, 619/136, 4374/901, 187389/36562, 482698/89893, ...
%e Approximately 1, 2, 2.75, 3.333, 3.808, 4.207, 4.551, 4.855, 5.125, 5.370, 5.593, ...
%o (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])};
%o a376606(n) = numerator(droprob(n))
%Y A376607 are the corresponding denominators.
%Y A376609 and A376610 are similar for a chess king visiting the Moore neighborhood.
%Y A376736 and A376737 are similar for a chess knight.
%Y Cf. A001263, A007764, A272763.
%K nonn,frac
%O 1,2
%A _Ruediger Jehn_ and _Hugo Pfoertner_, Oct 03 2024