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.

A296339 On an infinite 60-degree sector of hexagonal graph paper, fill in cells by antidiagonals so that each contains the least nonnegative integer such that no line of edge-adjacent cells contains a repeated term.

This page as a plain text file.
%I A296339 #59 Aug 04 2022 05:48:44
%S A296339 0,1,2,2,0,1,3,1,2,4,4,5,0,3,6,5,3,4,6,7,8,6,4,5,0,3,9,7,7,8,3,1,2,4,
%T A296339 5,9,8,6,7,2,0,1,9,4,3,9,7,8,5,1,2,6,10,11,12,10,11,6,9,4,0,8,7,5,13,
%U A296339 14,11,9,10,12,5,3,13,6,8,7,15,16,12,10,11,7
%N A296339 On an infinite 60-degree sector of hexagonal graph paper, fill in cells by antidiagonals so that each contains the least nonnegative integer such that no line of edge-adjacent cells contains a repeated term.
%C A296339 To find the number to enter in a cell (assuming the sector is oriented as in the illustration in the link), look at all the numbers in the cells directly above the cell, in the cells to the "North-West", and in the cells to the "South-West", and take their "mex" (the smallest missing number).
%C A296339 The 0-cells in the array all lie on a perfectly straight line (in contrast to the situation in A274528). Also a(n) = 0 iff n = 2*m*(m+1) for some m.
%H A296339 Rémy Sigrist, <a href="/A296339/b296339.txt">Rows n = 0..200, flattened</a>
%H A296339 F. Michel Dekking, Jeffrey Shallit, and N. J. A. Sloane, <a href="https://www.combinatorics.org/ojs/index.php/eljc/article/view/v27i1p52/8039">Queens in exile: non-attacking queens on infinite chess boards</a>, Electronic J. Combin., 27:1 (2020), #P1.52.
%H A296339 Rémy Sigrist, <a href="/A296339/a296339_1.png">Colored representation of the first 2^9 rows of the triangle</a>
%H A296339 Rémy Sigrist, <a href="/A296339/a296339.gp.txt">PARI program for A296339</a>
%H A296339 N. J. A. Sloane, <a href="/A296339/a296339.png">Illustration of initial rows of the sector.</a>
%e A296339 The initial rows are as follows (however, this does not show the adjancies between the cells correctly - for that, see the illustration in the link):
%e A296339    0;
%e A296339    1,  2;
%e A296339    2,  0,  1;
%e A296339    3,  1,  2,  4;
%e A296339    4,  5,  0,  3,  6;
%e A296339    5,  3,  4,  6,  7,  8;
%e A296339    6,  4,  5,  0,  3,  9,  7;
%e A296339    7,  8,  3,  1,  2,  4,  5,  9;
%e A296339    8,  6,  7,  2,  0,  1,  9,  4,  3;
%e A296339    9,  7,  8,  5,  1,  2,  6, 10, 11, 12;
%e A296339   10, 11,  6,  9,  4,  0, ...
%e A296339   ...
%e A296339 For example, referring to the illustration in the link and NOT to the triangle here, consider the first 5 in the array. The reason this is 5 is because in the column of cells above that cell we can see 2,0,1, to the NW we see 3, and to the SW we see 4, and the smallest missing number is 5.
%t A296339 ab = Table[0, {13}];
%t A296339 nw = ab;
%t A296339 A296339 = Reap[For[s = 1, s <= Length[ab], s++, sw = 0; For[c = 1, c <= s, c++, x = BitOr[ab[[c]], BitOr[nw[[s-c+1]], sw]]; v = IntegerExponent[x+1, 2]; Sow[v]; p = 2^v; sw += p; ab[[c]] += p; nw[[s-c+1]] += p]]][[2, 1]] (* _Jean-François Alcover_, Dec 18 2017, after _Rémy Sigrist_ *) (* I changed the first line, which was ab = Table[0, 13];, to make this compatible with older versions of MMA - _N. J. A. Sloane_, Feb 03 2018 *)
%o A296339 (PARI) See Links section.
%Y A296339 Two analogs of this for an infinite square chessboard are A269526 (which uses positive numbers) and A274528 (which uses nonnegative numbers).
%Y A296339 For the right edge see A296340.
%Y A296339 The second column is A004483. - _Rémy Sigrist_, Dec 11 2017
%Y A296339 The third and fourth columns are A004482 and A298801.
%Y A296339 See also A274820.
%K A296339 nonn,tabl
%O A296339 0,3
%A A296339 _N. J. A. Sloane_, Dec 10 2017
%E A296339 More terms from _Rémy Sigrist_, Dec 11 2017