login
This site is supported by donations to The OEIS Foundation.

 

Logo

Please make a donation to keep the OEIS running. We are now in our 55th year. In the past year we added 12000 new sequences and reached 8000 citations (which often say "discovered thanks to the OEIS"). We need to raise money to hire someone to manage submissions, which would reduce the load on our editors and speed up editing.
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A292675 Least number of symbols required to fill a grid of size n X n row by row in the greedy way such that in any row or column or rectangular 5 X 5 block no symbol occurs twice. 1
1, 4, 9, 16, 25, 27, 29, 32, 33, 33, 33, 34, 35, 35, 35, 36, 37, 38, 40, 40, 40, 40, 40, 40, 40, 40, 41, 43, 42, 42, 46, 47, 48, 52, 53, 53, 54, 57, 58, 58, 59, 62, 63, 64, 66, 68, 70, 72, 73, 74, 75, 75, 78, 78 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Consider the symbols as positive integers. By the greedy way we mean to fill the grid row by row from left to right always with the least possible positive integer such that the three constraints (on rows, columns and rectangular blocks) are satisfied.

In contrast to the sudoku case, the 5 X 5 rectangles have "floating" borders, so the constraint is actually equivalent to say that an element must be different from all neighbors in a Moore neighborhood of range 4 (having up to 9*9 = 81 grid points).

LINKS

Table of n, a(n) for n=1..54.

Eric W. Weisstein, Moore Neighborhood, on MathWorld--A Wolfram Web Resource.

PROG

(PARI) a(n, m=5, g=matrix(n, n))={my(ok(g, k, i, j, m)=if(m, ok(g[i, ], k)&&ok(g[, j], k)&&ok(concat(Vec(g[max(1, i-m+1)..i, max(1, j-m+1)..min(#g, j+m-1)])), k), !setsearch(Set(g), k))); for(i=1, n, for(j=1, n, for(k=1, n^2, ok(g, k, i, j, m)&&(g[i, j]=k)&&break))); vecmax(g)} \\ without "vecmax" the program returns the full n X n board.

CROSSREFS

Cf. A292670, A292671, A292672, ..., A292679

Sequence in context: A074373 A067115 A061077 * A254719 A266918 A086132

Adjacent sequences:  A292672 A292673 A292674 * A292676 A292677 A292678

KEYWORD

nonn,more

AUTHOR

M. F. Hasler, Sep 20 2017

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified December 15 04:23 EST 2019. Contains 329991 sequences. (Running on oeis4.)