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.
%I A274630 #38 Jun 30 2019 17:49:38 %S A274630 1,2,3,4,5,6,3,7,8,2,5,1,9,4,7,6,2,10,11,1,5,7,4,12,6,3,9,8,8,9,11,13, %T A274630 2,10,6,4,10,12,1,3,4,7,13,11,9,9,6,2,5,8,1,12,14,3,10,11,13,3,7,6,14, %U A274630 9,5,1,12,15,12,8,4,14,9,11,10,3,15,2,7,13,13,10,5,1,12,15,2,16,6,4,8,14,11 %N A274630 Square array T(n,k) (n>=1, k>=1) read by antidiagonals upwards in which the number entered in a square is the smallest positive number that is different from the numbers already filled in that are queens' or knights' moves away from that square. %C A274630 If we only worry about queens' moves then we get the array in A269526. %C A274630 Presumably, as in A269526, every column, every row, and every diagonal is a permutation of the natural numbers. %C A274630 The knights only affect the squares in their immediate neighborhood, so this array will have very similar properties to A269526. The most noticeable difference is that the first column is no longer A000027, it is now A274631. %C A274630 A piece that can move like a queen or a knight is known as a Maharaja. If we subtract 1 from the entries here we obtain A308201. - _N. J. A. Sloane_, Jun 30 2019 %H A274630 N. J. A. Sloane, <a href="/A274630/b274630.txt">Table of n, a(n) for n = 1..10010</a> %e A274630 The array begins: %e A274630 1, 3, 6, 2, 7, 5, 8, 4, 9, 10, 15, 13, 11, 18, 12, 20, 16, 22, ... %e A274630 2, 5, 8, 4, 1, 9, 6, 11, 3, 12, 7, 14, 17, 15, 10, 13, 19, 24, ... %e A274630 4, 7, 9, 11, 3, 10, 13, 14, 1, 2, 8, 5, 6, 16, 22, 17, 21, 12, ... %e A274630 3, 1, 10, 6, 2, 7, 12, 5, 15, 4, 16, 20, 13, 9, 11, 14, 25, 8, ... %e A274630 5, 2, 12, 13, 4, 1, 9, 3, 6, 11, 10, 17, 19, 8, 7, 15, 23, 29, ... %e A274630 6, 4, 11, 3, 8, 14, 10, 16, 13, 1, 2, 7, 15, 5, 24, 21, 9, 28, ... %e A274630 7, 9, 1, 5, 6, 11, 2, 12, 8, 14, 3, 21, 23, 22, 4, 27, 18, 30, ... %e A274630 8, 12, 2, 7, 9, 15, 1, 19, 4, 5, 6, 10, 18, 3, 26, 23, 11, 31, ... %e A274630 10, 6, 3, 14, 12, 4, 5, 9, 11, 7, 1, 8, 16, 13, 2, 24, 28, 20, ... %e A274630 9, 13, 4, 1, 10, 2, 7, 18, 12, 3, 17, 19, 24, 14, 20, 5, 8, 6, ... %e A274630 11, 8, 5, 9, 13, 3, 15, 1, 2, 6, 20, 18, 10, 4, 17, 7, 12, 14, ... %e A274630 12, 10, 7, 18, 11, 6, 4, 8, 14, 9, 5, 15, 21, 2, 16, 26, 3, 13, ... %e A274630 13, 15, 17, 12, 14, 16, 18, 7, 10, 22, 11, 3, 8, 19, 23, 9, 2, 1, ... %e A274630 14, 11, 19, 8, 5, 20, 3, 2, 16, 13, 12, 25, 4, 10, 6, 18, 7, 15, ... %e A274630 16, 18, 21, 10, 15, 13, 11, 17, 5, 8, 9, 6, 7, 30, 25, 28, 20, 19, ... %e A274630 15, 20, 13, 17, 16, 12, 19, 6, 7, 24, 18, 11, 28, 23, 14, 22, 5, 36, ... %e A274630 17, 14, 22, 19, 18, 8, 20, 10, 23, 15, 4, 1, 3, 24, 13, 16, 33, 9, ... %e A274630 18, 16, 23, 24, 25, 26, 14, 13, 17, 19, 22, 9, 5, 6, 8, 10, 15, 27, ... %e A274630 ... %e A274630 Look at the entry in the second cell in row 3. It can't be a 1, because the 1 in cell(1,2) is a knight's move away, it can't be a 2, 3, 4, or 5, because it is adjacent to cells containing these numbers, and there is a 6 in cell (1,3) that is a knight's move away. The smallest free number is therefore 7. %p A274630 # Based on _Alois P. Heinz_'s program for A269526 %p A274630 A:= proc(n, k) option remember; local m, s; %p A274630 if n=1 and k=1 then 1 %p A274630 else s:= {seq(A(i, k), i=1..n-1), %p A274630 seq(A(n, j), j=1..k-1), %p A274630 seq(A(n-t, k-t), t=1..min(n, k)-1), %p A274630 seq(A(n+j, k-j), j=1..k-1)}; %p A274630 # add knights moves %p A274630 if n >= 3 then s:={op(s),A(n-2,k+1)}; fi; %p A274630 if n >= 3 and k >= 2 then s:={op(s),A(n-2,k-1)}; fi; %p A274630 if n >= 2 and k >= 3 then s:={op(s),A(n-1,k-2)}; fi; %p A274630 if k >= 3 then s:={op(s),A(n+1,k-2)}; fi; %p A274630 for m while m in s do od; m %p A274630 fi %p A274630 end: %p A274630 [seq(seq(A(1+d-k, k), k=1..d), d=1..15)]; %t A274630 A[n_, k_] := A[n, k] = Module[{m, s}, If[n==1 && k==1, 1, s = Join[Table[ A[i, k], {i, 1, n-1}], Table[A[n, j], {j, 1, k-1}], Table[A[n-t, k-t], {t, 1, Min[n, k]-1}], Table[A[n+j, k-j], {j, 1, k-1}]] // Union; If[n >= 3, AppendTo[s, A[n-2, k+1]] // Union ]; If[n >= 3 && k >= 2, AppendTo[s, A[n-2, k-1]] // Union]; If[n >= 2 && k >= 3, AppendTo[s, A[n-1, k-2]] // Union]; If[k >= 3, AppendTo[s, A[n+1, k-2]] // Union]; For[m = 1, MemberQ[s, m], m++]; m]]; Table[A[1+d-k, k], {d, 1, 15}, {k, 1, d}] // Flatten (* _Jean-François Alcover_, Mar 14 2017, translated from Maple *) %Y A274630 Cf. A269526, A000027. %Y A274630 For first column, row, and main diagonal see A274631, A274632, A274633. %Y A274630 See A308883 for position of 1 in column n. %Y A274630 See A308201 for an essentially identical array. %K A274630 nonn,tabl %O A274630 1,2 %A A274630 _N. J. A. Sloane_ following a suggestion from _Joseph G. Rosenstein_, Jul 07 2016