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 11-13 of 13 results.

A320666 a(n) is the maximum number of liberties a single group can have on an otherwise empty n X n Go board.

Original entry on oeis.org

0, 2, 6, 9, 14, 22, 29, 38, 51, 61, 74, 92, 105, 122, 145, 161, 182, 210, 229, 254, 287, 309, 338, 376
Offset: 1

Views

Author

Ton Hospel, Oct 28 2018

Keywords

Comments

For 1 X 1 the solution is a single stone on the only possible position and is not a valid final board state in a real game of Go.
Also seems to be the answer to the following parking problem: maximum number of cars in an n X n carpark such that any car can leave through a single exit. See Puzzling StackExchange links. - Dmitry Kamenetsky, Mar 26 2021

Examples

			For n = 7 one of many a(7) = 29 solutions:
  *********
  *.O.....*
  *.OOOOOO*
  *.O....O*
  *.O.....*
  *.O.OOO.*
  *.OOO.O.*
  *.O...O.*
  *********
		

Crossrefs

A071619 is a trivial upper bound for this sequence.

Programs

  • Perl
    sub a {
         # Conjectured: This program is valid for any m X n board size
         my ($m, $n) = @_;
         $n = $m if !defined $n;
         ($m, $n) = ($n, $m) if $m > $n;
         # So now $m <= $n
         # This program is certain to be valid for all $m <= 24
         if ($m >= 4) {
             return $m*(2*$n-1)/3 if $m % 3 == 0;
             return $n*(2*$m-1)/3 if $n % 3 == 0;
             return ((2*$m-1)*(2*$n-1)+5)/6 if $m % 3 == 1 && $n % 3 == 1;
             return ((2*$m-1)*(2*$n-1)+3)/6; # if $m % 3 == 2 || $n % 3 == 2
         }
         return 2*$n if $m == 3;
         return $n == 3 ? 4 : $n if $m == 2;
         return $n >= 3 ? 2 : $n-1 if $m == 1;
         die "Bad call";
    }

Formula

Exact for n <= 24, conjectured for n > 24 but it is at least a lower bound:
a(n) = 0 if n = 1.
a(n) = 2 if n = 2.
a(n) = 6 if n = 3.
a(n) = n*(2*n-1)/3 if n = 0 (mod 3) and n != 3.
a(n) = ((2n-1)^2+5)/6 if n = 1 (mod 3) and n != 1.
a(n) = ((2n-1)^2+3)/6 if n = 2 (mod 3).
Conjectures from Colin Barker, Jun 05 2019: (Start)
G.f.: x^2*(2 + 4*x + 3*x^2 + x^3 + x^5 + x^6 + x^7 - x^8) / ((1 - x)^3*(1 + x + x^2)^2).
a(n) = a(n-1) + 2*a(n-3) - 2*a(n-4) - a(n-6) + a(n-7) for n>9.
(End)

A358160 a(n) is the hafnian of the 2n X 2n symmetric matrix defined by M[i,j] = i*j - floor(i*j/3).

Original entry on oeis.org

1, 2, 40, 3884, 1016376, 534983256, 510252517152, 802452895865280, 1901953775079849600, 6537796866589765507200, 31381746234057256630521600
Offset: 0

Views

Author

Stefano Spezia, Nov 01 2022

Keywords

Comments

The matrix M(n) is the n-th principal submatrix of the rectangular array A143976.

Examples

			a(2) = 40:
    1   2   2   3
    2   3   4   6
    2   4   6   8
    3   6   8  11
		

Crossrefs

Cf. A143976.
Cf. A071619 (matrix element M[n,n]), A358159 (permanent of M(2*n)), A358042 (trace of M(n)).

Programs

  • Mathematica
    M[i_, j_, n_]:=Part[Part[Table[r*c-Floor[r*c/3], {r, n}, {c, n}], i], j]; a[n_]:=Sum[Product[M[Part[PermutationList[s, 2n], 2i-1], Part[PermutationList[s, 2n], 2i], 2n], {i, n}], {s, SymmetricGroup[2n]//GroupElements}]/(n!*2^n); Array[a, 6, 0]
  • PARI
    tm(n) = matrix(n, n, i, j, i*j - (i*j)\3);
    a(n) = my(m = tm(2*n), s=0); forperm([1..2*n], p, s += prod(j=1, n, m[p[2*j-1], p[2*j]]); ); s/(n!*2^n); \\ Michel Marcus, May 02 2023

Extensions

a(6) from Michel Marcus, May 02 2023
a(7)-a(10) from Pontus von Brömssen, Oct 15 2023

A357837 a(n) is the sum of the lengths of all the segments used to draw a square of side n representing a fishbone pattern using symmetric L-shaped tiles with side length 2.

Original entry on oeis.org

0, 4, 10, 20, 32, 46, 64, 84, 106, 132, 160, 190, 224, 260, 298, 340, 384, 430, 480, 532, 586, 644, 704, 766, 832, 900, 970, 1044, 1120, 1198, 1280, 1364, 1450, 1540, 1632, 1726, 1824, 1924, 2026, 2132, 2240, 2350, 2464, 2580, 2698, 2820, 2944, 3070, 3200, 3332
Offset: 0

Views

Author

Stefano Spezia, Oct 17 2022

Keywords

Examples

			Illustrations for n = 1..8:
        _           _ _          _ _ _
       |_|         |  _|        |  _|_|
                   |_|_|        |_|  _|
                                |_|_|_|
    a(1) = 4     a(2) = 10     a(3) = 20
     _ _ _ _     _ _ _ _ _    _ _ _ _ _ _
    |  _|_| |   |  _|_|  _|  |  _|_|  _|_|
    |_|  _|_|   |_|  _|_| |  |_|  _|_|  _|
    |_|_|  _|   |_|_|  _|_|  |_|_|  _|_| |
    |_ _|_|_|   |  _|_|  _|  |  _|_|  _|_|
                |_|_ _|_|_|  |_|  _|_|  _|
                             |_|_|_ _|_|_|
    a(4) = 32    a(5) = 46     a(6) = 64
      _ _ _ _ _ _ _      _ _ _ _ _ _ _ _
     |  _|_|  _|_| |    |  _|_|  _|_|  _|
     |_|  _|_|  _|_|    |_|  _|_|  _|_| |
     |_|_|  _|_|  _|    |_|_|  _|_|  _|_|
     |  _|_|  _|_| |    |  _|_|  _|_|  _|
     |_|  _|_|  _|_|    |_|  _|_|  _|_| |
     |_|_|  _|_|  _|    |_|_|  _|_|  _|_|
     |_ _|_|_ _|_|_|    |  _|_|  _|_|  _|
                        |_|_ _|_|_ _|_|_|
        a(7) = 84           a(8) = 106
		

Crossrefs

Cf. A002264, A002522, A005843, A047410 (first differences), A071619, A211547.
Cf. A345118.

Programs

  • Mathematica
    Table[2(Ceiling[2(n+1)^2/3]-1),{n,0,49}]

Formula

a(n) = 2*(ceiling(2*(n+1)^2/3) - 1).
a(n) = 2*(A071619(n+1) - 1).
a(n) = 2*(1 + n^2 - 2*(n - 2)*floor((n - 1)/3) + 3*floor((n - 1)/3)^2) for n > 0.
a(n) = Sum_{k=1..n} A047410(k+1) for n > 0.
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5) for n > 4.
O.g.f.: 2*x*(2 + x + 2*x^2 - x^3)/((1 - x)^3*(1 + x + x^2)).
E.g.f.: 2*exp(-x/2)*(exp(3*x/2)*(6*x*(3 + x) - 1) + cos(sqrt(3)*x/2) + sqrt(3)*sin(sqrt(3)*x/2))/9.
Previous Showing 11-13 of 13 results.