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.

Previous Showing 51-60 of 74 results. Next

A243424 Triangle T(n,k) read by rows of number of ways k domicules can be placed on an n X n square (n >= 0, 0 <= k <= floor(n^2/2)).

Original entry on oeis.org

1, 1, 1, 6, 3, 1, 20, 110, 180, 58, 1, 42, 657, 4890, 18343, 33792, 27380, 7416, 280, 1, 72, 2172, 36028, 362643, 2307376, 9382388, 24121696, 37965171, 34431880, 16172160, 3219364, 170985, 1, 110, 5375, 154434, 2911226, 38049764, 355340561, 2408715568
Offset: 0

Views

Author

Alois P. Heinz, Jun 04 2014

Keywords

Comments

A domicule is either a domino or it is formed by the union of two neighboring unit squares connected via their corners. In a tiling the connections of two domicules are allowed to cross each other.
The n-th row gives the coefficients of the matching-generating polynomial of the n X n king graph. - Eric W. Weisstein, Jun 20 2017

Examples

			T(2,1) = 6:
  +---+  +---+  +---+  +---+  +---+  +---+
  |o-o|  |   |  |o  |  |  o|  |o  |  |  o|
  |   |  |   |  ||  |  |  ||  | \ |  | / |
  |   |  |o-o|  |o  |  |  o|  |  o|  |o  |
  +---+  +---+  +---+  +---+  +---+  +---+
T(2,2) = 3:
  +---+  +---+  +---+
  |o-o|  |o o|  |o o|
  |   |  || ||  | X |
  |o-o|  |o o|  |o o|
  +---+  +---+  +---+
Triangle T(n,k) begins:
  1;
  1;
  1,  6,    3;
  1, 20,  110,   180,     58;
  1, 42,  657,  4890,  18343,   33792,   27380,     7416,      280;
  1, 72, 2172, 36028, 362643, 2307376, 9382388, 24121696, 37965171, ...
  ...
		

Crossrefs

Columns k=0-5 give: A000012, A002943(n-1) for n>0, A243464, A243465, A243466, A243467.
Row sums give A220638.
T(n,floor(n^2/2)) gives A243510.
T(n,floor(n^2/4)) gives A243511.
Cf. A242861 (the same for dominoes), A239264.

Programs

  • Maple
    b:= proc(n, l) option remember; local d, f, k;
          d:= nops(l)/2; f:=false;
          if n=0 then 1
        elif l[1..d]=[f$d] then b(n-1, [l[d+1..2*d][], true$d])
        else for k to d while not l[k] do od;
             expand(b(n, subsop(k=f, l))+
             `if`(k1 and l[k+d+1],
                                x*b(n, subsop(k=f, k+d+1=f, l)), 0)+
             `if`(k>1 and n>1 and l[k+d-1],
                                x*b(n, subsop(k=f, k+d-1=f, l)), 0)+
             `if`(n>1 and l[k+d], x*b(n, subsop(k=f, k+d=f, l)), 0)+
             `if`(k (p-> seq(coeff(p,x,i), i=0..degree(p)))(b(n, [true$(n*2)])):
    seq(T(n), n=0..7);
  • Mathematica
    b[n_, l_] := b[n, l] = Module[{d, f, k}, d = Length[l]/2; f = False; Which[ n == 0, 1, l[[1 ;; d]] == Table[f, d], b[n-1, Join[l[[d+1 ;; 2d]], Table[ True, d]]], True, For[k = 1, !l[[k]], k++]; Expand[b[n, ReplacePart[l, k -> f]] + If[k1 && l[[k+d+1]], x*b[n, ReplacePart[l, {k -> f, k + d + 1 -> f}]], 0] + If[k>1 && n>1 && l[[k + d - 1]], x*b[n, ReplacePart[ l, {k -> f, k + d - 1 -> f}]], 0] + If[n>1 && l[[k + d]], x*b[n, ReplacePart[l, {k -> f, k+d -> f}]], 0] + If[k f, k+1 -> f}]], 0]]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][
      b[n, Table[True, 2n]]];
    Table[T[n], {n, 0, 7}] // Flatten (* Jean-François Alcover, Jun 09 2018, after Alois P. Heinz *)

A187586 T(n,k)=Number of n-step E, S, NW and NE-moving king's tours on a kXk board summed over all starting positions.

Original entry on oeis.org

1, 4, 0, 9, 6, 0, 16, 20, 8, 0, 25, 42, 48, 5, 0, 36, 72, 120, 84, 0, 0, 49, 110, 224, 286, 106, 0, 0, 64, 156, 360, 604, 578, 104, 0, 0, 81, 210, 528, 1038, 1484, 1069, 78, 0, 0, 100, 272, 728, 1588, 2794, 3514, 1708, 34, 0, 0, 121, 342, 960, 2254, 4508, 7480, 7666, 2309, 13
Offset: 1

Views

Author

R. H. Hardin Mar 11 2011

Keywords

Comments

Table starts
.1.4...9...16....25.....36.....49......64......81.....100.....121.....144
.0.6..20...42....72....110....156.....210.....272.....342.....420.....506
.0.8..48..120...224....360....528.....728.....960....1224....1520....1848
.0.5..84..286...604...1038...1588....2254....3036....3934....4948....6078
.0.0.106..578..1484...2794...4508....6626....9148...12074...15404...19138
.0.0.104.1069..3514...7480..12874...19696...27946...37624...48730...61264
.0.0..78.1708..7666..19104..35832...57592...84384..116208..153064..194952
.0.0..34.2309.15056..45718..95776..164135..250132..353767..475040..613951
.0.0..13.2792.27252.103108.246792..458018..732810.1069534.1468190.1928778
.0.0...0.3108.45960.219432.609070.1243461.2111652.3201436.4508924

Examples

			Some k=4 solutions for 4X4
..0..0..0..0....3..0..0..0....0..0..0..0....0..4..0..0....0..0..0..3
..0..0..0..0....4..2..0..0....4..2..0..0....3..0..0..0....0..0..2..4
..0..1..2..0....1..0..0..0....0..3..1..0....0..2..0..0....0..0..0..1
..0..0..3..4....0..0..0..0....0..0..0..0....1..0..0..0....0..0..0..0
		

Crossrefs

Row 2 is A002943(n-1)
Row 3 is A152750(n-1)

Formula

Empirical: T(1,k) = k^2
Empirical: T(2,k) = 4*k^2 - 6*k + 2
Empirical: T(3,k) = 16*k^2 - 40*k + 24
Empirical: T(4,k) = 58*k^2 - 204*k + 174 for k>2
Empirical: T(5,k) = 202*k^2 - 912*k + 994 for k>3
Empirical: T(6,k) = 714*k^2 - 3888*k + 5104 for k>4
Empirical: T(7,k) = 2516*k^2 - 15980*k + 24408 for k>5
Empirical: T(8,k) = 8819*k^2 - 63926*k + 111127 for k>6
Empirical: T(9,k) = 30966*k^2 - 251630*k + 489234 for k>7
Empirical: T(10,k) = 108852*k^2 - 978404*k + 2100276 for k>8

A068377 Engel expansion of sinh(1).

Original entry on oeis.org

1, 6, 20, 42, 72, 110, 156, 210, 272, 342, 420, 506, 600, 702, 812, 930, 1056, 1190, 1332, 1482, 1640, 1806, 1980, 2162, 2352, 2550, 2756, 2970, 3192, 3422, 3660, 3906, 4160, 4422, 4692, 4970, 5256, 5550, 5852, 6162, 6480, 6806, 7140, 7482, 7832, 8190
Offset: 1

Views

Author

Benoit Cloitre, Mar 03 2002

Keywords

Comments

This sequence is also the Pierce expansion of sin(1). - G. C. Greubel, Nov 14 2016

Crossrefs

Programs

  • Mathematica
    Join[{1}, Table[(2 n - 2) (2 n - 1), {n, 2, 50}]] (* Bruno Berselli, Aug 04 2015 *)
    LinearRecurrence[{3,-3,1}, {1,6,20,42}, 25] (* G. C. Greubel, Oct 27 2016; a(1)=1 by Georg Fischer, Apr 02 2019*)
    Rest@ CoefficientList[Series[x (1 + 3 x + 5 x^2 - x^3)/(1 - x)^3, {x, 0, 46}], x] (* Michael De Vlieger, Oct 28 2016 *)
    PierceExp[A_, n_] := Join[Array[1 &, Floor[A]], First@Transpose@ NestList[{Floor[1/Expand[1 - #[[1]] #[[2]]]], Expand[1 - #[[1]] #[[2]]]} &, {Floor[1/(A - Floor[A])], A - Floor[A]}, n - 1]]; PierceExp[N[Sin[1] , 7!], 50] (* G. C. Greubel, Nov 14 2016 *)
  • PARI
    A068377(n)=(n+n--)*n*2+!n \\ M. F. Hasler, Jul 19 2015
    
  • Sage
    A068377 = lambda n: rising_factorial(n*2,2) if n>0 else 1
    print([A068377(n) for n in (0..45)]) # Peter Luschny, Aug 04 2015

Formula

a(n) = (2*n-2)*(2*n-1) = A002943(n-1) = 2*A000217(2n-2) for n>1. [Corrected and extended by M. F. Hasler, Jul 19 2015]
From Colin Barker, Apr 13 2012: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>4.
G.f.: x*(1 + 3*x + 5*x^2 - x^3)/(1-x)^3. (End)
E.g.f.: -2 + x + 2*(1 - x + 2*x^2)*exp(x). - G. C. Greubel, Oct 27 2016
From Amiram Eldar, May 05 2025: (Start)
Sum_{n>=1} 1/a(n) = 2 - log(2).
Sum_{n>=1} (-1)^(n+1)/a(n) = 2 - Pi/4 - log(2)/2. (End)

A173511 a(n) = 4*n^2 + floor(n/2).

Original entry on oeis.org

0, 4, 17, 37, 66, 102, 147, 199, 260, 328, 405, 489, 582, 682, 791, 907, 1032, 1164, 1305, 1453, 1610, 1774, 1947, 2127, 2316, 2512, 2717, 2929, 3150, 3378, 3615, 3859, 4112, 4372, 4641, 4917, 5202, 5494, 5795, 6103, 6420, 6744, 7077, 7417, 7766, 8122
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 20 2010

Keywords

Examples

			a(6) = 147; 4(6)^2 + floor(6/3) = 144 + 3 = 147.
		

Crossrefs

Programs

Formula

a(n) = floor((2*n + 1/8)^2).
a(n+1) - a(n) = A173512(n).
a(n) = A002943(n) - A007494(n) = A007742(n) - A110654(n).
a(2*n) = A157474(n) for n>0.
From - R. J. Mathar, Feb 21 2010: (Start)
a(n)= 2*a(n-1) -2*a(n-3) +a(n-4).
G.f.: -x*(4+9*x+3*x^2)/((1+x)*(x-1)^3). (End)
E.g.f.: (x*(8*x + 9)*cosh(x) + (8*x^2 + 9*x - 1)*sinh(x))/2. - Stefano Spezia, Apr 24 2024

A113689 Number of semiprimes in clumps of size > 1 through n^2 in the semiprime spiral.

Original entry on oeis.org

0, 0, 2, 6, 9, 13, 17, 21, 23, 31, 37, 45, 54, 59, 72, 77, 83, 93, 104, 116, 125, 140, 150, 164, 180, 188, 203, 219, 236, 255, 272, 287, 301, 317, 334, 354, 378, 403, 419, 430, 450, 475, 498, 521, 542, 560, 588, 608, 626, 652, 677, 698
Offset: 1

Views

Author

Jonathan Vos Post, Nov 05 2005

Keywords

Comments

Write the integers 1, 2, 3, 4, ... in a counterclockwise square spiral. Analogous to Ulam coloring in the primes in the spiral and discovering unexpectedly many connected diagonals, we construct a semiprime spiral by coloring in all semiprimes (A001358). Each integer has 8 adjacent integers in the spiral, horizontally, vertically and diagonally. Curious extended clumps coagulate, slightly denser towards the origin, of semiprimes connected by adjacency. This sequence, A113689, gives an enumeration of the number of semiprimes in clumps of size > 1 through n^2, not looking past the square boundary. A113688 gives isolated semiprimes in the semiprime spiral, namely those semiprimes none of whose adjacent integers in the spiral are semiprimes.

Examples

			a(3) = 2 because there is one visible clump through 3^2 = 9, {4,6}, which two semiprimes are diagonally connected.
a(4) = 6 because there are 6 semiprimes in the 2 visible clumps through 4^2 = 16, {4, 6, 14, 15}, {9, 10}.
a(5) = 9 because there are 9 semiprimes in the 3 visible clumps through 5^2 = 25, {4, 6, 14, 15}, {9, 10, 25}, {21, 22}.
......................
... 17 16 15 14 13 ...
... 18  5  4  3 12 ...
... 19  6  1  2 11 ...
... 20  7  8  9 10 ...
... 21 22 23 24 25 ...
......................
		

References

  • S. M. Ellerstein, The square spiral, J. Recreational Mathematics 29 (#3, 1998) 188; 30 (#4, 1999-2000), 246-250.

Crossrefs

Extensions

Corrected and extended by Alois P. Heinz, Jan 02 2011

A181995 a(n) = if n mod 2 = 1 then n*(n - 1) else (n - 1)^2 + (n - 2)/2.

Original entry on oeis.org

0, 0, 1, 6, 10, 20, 27, 42, 52, 72, 85, 110, 126, 156, 175, 210, 232, 272, 297, 342, 370, 420, 451, 506, 540, 600, 637, 702, 742, 812, 855, 930, 976, 1056, 1105, 1190, 1242, 1332, 1387, 1482, 1540, 1640, 1701, 1806, 1870, 1980, 2047, 2162, 2232, 2352, 2425, 2550, 2626, 2756, 2835, 2970, 3052, 3192, 3277, 3422, 3510, 3660, 3751, 3906, 4000, 4160, 4257, 4422
Offset: 0

Views

Author

N. J. A. Sloane, Apr 05 2012

Keywords

Comments

Decagonal numbers (A001107) and twice second hexagonal numbers (A002943) interleaved. - Omar E. Pol, Aug 03 2012
Similar to A074377. Members of this family are A093005, A210977, A006578, A210978, this sequence, A210981, A210982. - Omar E. Pol, Aug 09 2012
Number of kites whose vertices are the vertices a regular 2n-gon. - Halil Ibrahim Kanpak, Nov 08 2018

Crossrefs

Programs

  • Magma
    [n*(4*n - 5 - (-1)^n)/4 : n in [0..80]]; // Wesley Ivan Hurt, Apr 11 2016
  • Maple
    f:=n->if n mod 2 = 1 then n*(n-1) else (n-1)^2+(n-2)/2; fi;
    [seq(f(n),n=0..130)];
  • Mathematica
    Table[n*(4*n - 5 - (-1)^n)/4, {n, 0, 80}] (* Wesley Ivan Hurt, Apr 11 2016 *)
  • PARI
    a(n)=n*(4*n-5-(-1)^n)/4 \\ Charles R Greathouse IV, Oct 07 2015
    

Formula

G.f.: -x^2*(1 + 5*x + 2*x^2)/((1 + x)^2*(x - 1)^3). - R. J. Mathar, Apr 06 2012
a(n) = n*(4*n - 5 - (-1)^n)/4. - Luce ETIENNE, Oct 04 2014
From Wesley Ivan Hurt, Apr 11 2016: (Start)
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>4.
a(n) = Sum_{i=floor((n-1)/2)..floor(3*(n-1)/2)} i. (End)
E.g.f.: x^2*cosh(x) - x*(1 - 2*x)*sinh(x)/2. - Franck Maminirina Ramaharo, Nov 08 2018

A133280 Triangle formed by: 1 even, 2 odd, 3 even, 4 odd, ... starting with zero.

Original entry on oeis.org

0, 1, 3, 4, 6, 8, 9, 11, 13, 15, 16, 18, 20, 22, 24, 25, 27, 29, 31, 33, 35, 36, 38, 40, 42, 44, 46, 48, 49, 51, 53, 55, 57, 59, 61, 63, 64, 66, 68, 70, 72, 74, 76, 78, 80, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120
Offset: 0

Views

Author

Omar E. Pol, Aug 27 2008

Keywords

Comments

This sequence is related to the Connell sequence (A001614).
First member of every row is a square (A000290).
A127366(T(n,k)) mod 2 = 0 or equal parity of T(n,k) and A000196(T(n,k)); complement of A195437. - Reinhard Zumkeller, Oct 12 2011
Written as a square array the main diagonal gives A002943. - Omar E. Pol, Aug 13 2013
Last member of every row is one less than a square (A005563). - Harvey P. Dale, Oct 02 2013

Examples

			Written as a triangle the sequence begins:
    0;
    1,   3;
    4,   6,   8;
    9,  11,  13,  15;
   16,  18,  20,  22,  24;
   25,  27,  29,  31,  33,  35;
   36,  38,  40,  42,  44,  46,  48;
   49,  51,  53,  55,  57,  59,  61,  63;
   64,  66,  68,  70,  72,  74,  76,  78,  80;
   81,  83,  85,  87,  89,  91,  93,  95,  97,  99;
  100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120;
		

Crossrefs

Column 1 is A000290. Right border gives A005563.
Cf. A001614.
Cf. A045991 (row sums). - R. J. Mathar, Jul 20 2009

Programs

  • Haskell
    a133280 n k = a133280_tabl !! n !! k
    a133280_tabl = f 0 1 [0..] where
       f m j xs = (filter ((== m) . (`mod` 2)) ys) : f (1 - m) (j + 2) xs'
         where (ys,xs') = splitAt j xs
    b133280 = bFile' "A133280" (concat $ take 101 a133280_tabl) 0
    -- Reinhard Zumkeller, Oct 12 2011
    
  • Mathematica
    Flatten[Table[Range[(n-1)^2,n^2-1,2],{n,20}]] (* Harvey P. Dale, Oct 02 2013 *)
  • PARI
    T(n,k) = n^2 + 2*k;
    for(n=0,10,for(k=0,n,print1(T(n,k),", "))); \\ Joerg Arndt, Aug 13 2013
    
  • Python
    from math import isqrt
    def A133280(n): return (m:=(n<<1)+1)-((isqrt(m+1<<2)+1)>>1) # Chai Wah Wu, Aug 01 2022

Formula

a(n) = A005408(n) - A002024(n+1). - Ivan N. Ianakiev, Aug 13 2013
T(n,k) = n^2 + 2*k. - Joerg Arndt, Aug 13 2013

A161896 Integers n for which k = (9^n - 3 * 3^n - 4n) / (2n * (2n + 1)) is an integer.

Original entry on oeis.org

5, 11, 23, 29, 41, 53, 83, 89, 113, 131, 173, 179, 191, 233, 239, 251, 281, 293, 359, 419, 431, 443, 491, 509, 593, 641, 653, 659, 683, 719, 743, 761, 809, 911, 953, 1013, 1019, 1031, 1049, 1103, 1223, 1229, 1289, 1409, 1439, 1451, 1481, 1499, 1511, 1541, 1559
Offset: 1

Views

Author

Reikku Kulon, Jun 21 2009

Keywords

Comments

Near superset of the Sophie Germain primes (A005384), excluding 2 and 3: 2n + 1 is prime. Nearly all members of this sequence are also prime, but four members less than 10000 are composite: 1541 = 23 * 67, 2465 = 5 * 17 * 29, 3281 = 17 * 193, and 4961 = 11^2 * 41.
The congruence of n modulo 4 is evenly distributed between 1 and 3. n is congruent to 5 (mod 6) for all n less than two billion.
This sequence has roughly twice the density of the sequence (A158034) corresponding to the Diophantine equation
f = (4^n - 2^n + 8n^2 - 2) / (2n * (2n + 1)),
and contains most members of that sequence. Those it does not contain are composite and often congruent to 3 (mod 6).
Composite terms appear to predominantly belong to A262051. - Bill McEachen, Aug 29 2024

Crossrefs

Programs

  • Haskell
    a161896 n = a161896_list !! (n-1)
    a161896_list = [x | x <- [1..],
                        (9^x - 3*3^x - 4*x) `mod` (2*x*(2*x + 1)) == 0]
    -- Reinhard Zumkeller, Jan 12 2014
    
  • PARI
    is(n)=my(m=2*n*(2*n+1),t=Mod(3,m)^n); t^2-3*t==4*n \\ Charles R Greathouse IV, Nov 25 2014

A302488 Total domination number of the n X n grid graph.

Original entry on oeis.org

0, 1, 2, 3, 6, 9, 12, 15, 20, 25, 30, 35, 42, 49, 56, 63, 72, 81, 90, 99, 110, 121, 132, 143, 156, 169, 182, 195, 210, 225, 240, 255, 272, 289, 306, 323, 342, 361, 380, 399, 420, 441, 462, 483, 506, 529, 552, 575, 600, 625, 650, 675, 702, 729, 756, 783, 812, 841, 870, 899, 930
Offset: 0

Views

Author

Eric W. Weisstein, Apr 08 2018

Keywords

Comments

Extended to a(0) and a(1) using the formula/recurrence. The total domination number of the 1 X 1 grid graph is undefined.

Crossrefs

Main diagonal of A300358.
The four quadrasections are A002943, A016754, A002939(n+1), A000466(n+1).
Bisections are A002378 and A085046.
Cf. A303142.

Programs

  • Magma
    R:=RealField(); [Round(((-1)^n + 2*n*(n + 2) + 4*Sin(n*Pi(R)/2) - 1)/8): n in [0..30]]; // G. C. Greubel, Apr 09 2018
  • Mathematica
    Table[(-1 + (-1)^n + 2 n (2 + n) + 4 Sin[n Pi/2])/8, {n, 0, 20}]
    LinearRecurrence[{2, -1, 0, 1, -2, 1}, {0, 1, 2, 3, 6, 9}, 20]
    CoefficientList[Series[x (-1 - 2 x^3 + x^4)/((-1 + x)^3 (1 + x + x^2 + x^3)), {x, 0, 20}], x]
  • PARI
    for(n=0,30, print1(round(((-1)^n + 2*n*(n + 2) + 4*sin(n*Pi/2) - 1)/8), ", ")) \\ G. C. Greubel, Apr 09 2018
    
  • PARI
    a(n)=my(m=n\4); (2*m+1)*(2*m + n%4) \\ Andrew Howroyd, Aug 17 2025
    

Formula

a(n) = ((-1)^n + 2*n*(n + 2) + 4*sin(n*Pi/2) - 1)/8.
a(n) = 2*a(n-1) - a(n-2) + a(n-4) - 2*a(n-5) + a(n-6).
G.f.: x*(1 + 2*x^3 - x^4)/((1 - x)^3*(1 + x + x^2 + x^3)).
a(4*m + r) = (2*m + 1)*(2*m + r) for 0 <= r < 4. - Charles Kusniec, Aug 16 2025
From Amiram Eldar, Aug 26 2025: (Start)
Sum_{n>=1} 1/a(n) = Pi^2/8 + 3/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/8 - 1/2. (End)

Extensions

a(0)=0 prepended and offset corrected by Andrew Howroyd, Aug 17 2025

A181018 Maximum number of 1's in an n X n binary matrix with no three 1's adjacent in a line along a row, column or diagonally.

Original entry on oeis.org

1, 4, 6, 9, 16, 20, 26, 36, 42, 52, 64, 74, 86, 100, 114, 130
Offset: 1

Views

Author

R. H. Hardin, Sep 30 2010

Keywords

Comments

Diagonal of A181019.
Three or more "1"s may be adjacent in an L-shape or step shape (cf. bottom of first example) or 2 X 2 square (top right of 2nd example) or similar. One possible (not always optimal) solution is therefore to fill the square with 2 X 2 squares of "1"s, separated by rows of "0"s: this yields the lower bound (n - floor(n/3))^2 = ceiling(2n/3)^2 given in FORMULA. I conjecture that this is optimal for n = 2 (mod 3) and that a(n) ~ (2n/3)^2. For n = 3k, the array can be filled with 2k(2k+1) "1"s by repeating the optimal solution for n = 3 on the diagonal, and filling the rest with 2 X 2 blocks separated by rows of "0"s, cf. the 4th example for 6 X 6. - M. F. Hasler, Jul 17 2015 [Conjecture proved to be wrong, see below. - M. F. Hasler, Jan 19 2016]
74 <= a(12) <= 77. - Manfred Scheucher, Jul 23 2015
You can repeat a 4 X 2 block [1100; 0011] infinitely in both directions and then crop the needed square. That gives ceiling(n^2/2). It eventually surpasses the solutions we've found so far: at 17*17 the pattern above gives 12*12=144 but this one ceiling(17*17/2)=145. The credit for finding this goes to Jaakko Himberg. - Juhani Heino, Aug 11 2015

Examples

			Some solutions for 6 X 6:
  0 1 1 0 1 1    0 1 1 0 1 1    0 1 1 0 1 1    0 1 1 0 1 1
  1 0 1 0 0 1    1 0 1 0 1 1    1 0 1 0 0 1    1 0 1 0 1 1
  1 1 0 0 1 0    1 1 0 0 0 0    1 1 0 0 1 0    1 1 0 0 0 0
  0 0 0 0 1 1    0 0 0 0 1 1    0 0 0 0 1 1    0 0 0 0 1 1
  1 0 1 1 0 1    1 0 1 1 0 1    1 1 0 1 0 1    1 1 0 1 0 1
  1 1 0 1 1 0    1 1 0 1 1 0    1 1 0 1 1 0    1 1 0 1 1 0
A solution with 73 ones for 12 X 12 (I replaced "0" with "." for readability):
  1 1 . 1 1 . 1 1 . 1 . 1
  1 1 . . 1 1 . 1 1 . 1 1
  . . . 1 . . . . . . 1 .
  1 1 . 1 . 1 . 1 1 . . 1
  . 1 1 . . 1 1 . . 1 1 .
  1 . . . 1 . 1 . 1 . . 1
  1 1 . . 1 1 . . 1 . 1 .
  . 1 . 1 . 1 . 1 . . 1 1
  1 . . 1 1 . . 1 1 . . 1
  . 1 . . . . 1 . 1 . 1 .
  1 1 . 1 1 . 1 1 . . 1 1
  1 . 1 . 1 1 . 1 . 1 . 1
- _Manfred Scheucher_, Jul 23 2015
An optimal solution with 74 ones (denoted by O) for 12 X 12 (also symmetric):
  O . O . O . O O . O O .
  O O . O O . . . O O . O
  . O . O . O O . . . O O
  O . . . O O . O O . O .
  . O O . . . O . . . . O
  O O . O O . O . O O . .
  . . O O . O . O O . O O
  O . . . . O . . . O O .
  . O . O O . O O . . . O
  O O . . . O O . O . O .
  O . O O . . . O O . O O
  . O O . O O . O . O . O - _Giovanni Resta_, Jul 29 2015
		

Crossrefs

Programs

  • Java
    See Taylor link
    (MATLAB with CPLEX)
    function v = A181018(n)
    %
    Grid = [1:n]' * ones(1,n) + n*ones(n,1)*[0:n-1];
    f = -ones(n^2,1);
    A = sparse(4*(n-2)*(n-1),n^2);
    count = 0;
    for i =1:n
      for j = 1:n-2
        count = count+1;
        A(count, [Grid(i,j),Grid(i,j+1),Grid(i,j+2)]) = 1;
      end
    end
    for i = 1:n-2
      for j = 1:n
        count = count+1;
        A(count, [Grid(i,j),Grid(i+1,j),Grid(i+2,j)]) = 1;
      end
    end
    for i = 1:n-2
      for j = 1:n-2
        count = count+2;
        A(count-1,[Grid(i,j+2),Grid(i+1,j+1),Grid(i+2,j)]) = 1;
        A(count, [Grid(i,j),Grid(i+1,j+1),Grid(i+2,j+2)]) = 1;
      end
    end
    b = 2*ones(4*(n-2)*(n-1),1);
    [x,v,exitflag,output] = cplexbilp(f,A,b);
    end;
    for n = 1:11
      A(n) = A181018(n);
    end
    A % Robert Israel, Jan 14 2016

Formula

a(n) >= ceiling(2n/3)^2; a(3k) >= A002943(k) = 2k(2k+1). - M. F. Hasler, Jul 17 2015; revised by Juhani Heino, Aug 11 2015
a(n) >= ceiling(n^2/2). - Juhani Heino, Aug 11 2015

Extensions

a(11)-a(12) from M. F. Hasler, Jul 20 2015
a(12) deleted by Manfred Scheucher, Jul 23 2015
a(12) from Giovanni Resta, Jul 29 2015
PARI code (which implemented a conjectured formula shown to underestimate) deleted by Peter J. Taylor, Jan 06 2016
a(13)-a(15) from Peter J. Taylor, Jan 09 2016
a(16) from Peter J. Taylor, Jan 14 2016
Previous Showing 51-60 of 74 results. Next