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.

Showing 1-2 of 2 results.

A290058 Number of X-rays of n X n binary matrices with exactly floor(n^2/2) ones.

Original entry on oeis.org

1, 1, 4, 30, 440, 9892, 331950, 15121926, 915201732, 70120569074, 6696969703276, 774618119733020, 107284227278413622, 17455779156567652806, 3307802489634916900474, 720231707823173636419042, 178973636259170839478327332, 50249140887232774758578932120
Offset: 0

Views

Author

Alois P. Heinz, Jul 19 2017

Keywords

Comments

The X-ray of a matrix is defined as the sequence of antidiagonal sums.

Examples

			a(2) = 4: 011, 020, 101, 110.
a(3) = 30: 00121, 00211, 00220, 00301, 00310, 01021, 01111, 01120, 01201, 01210, 01300, 02011, 02020, 02101, 02110, 02200, 10021, 10111, 10120, 10201, 10210, 10300, 11011, 11020, 11101, 11110, 11200, 12001, 12010, 12100.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; (m-> `if`(n>m, 0, `if`(n=m, 1,
          add(b(n-j, i-t, 1-t), j=0..min(i, n)))))(i*(i+1-t))
        end:
    a:= n-> b(iquo(n^2, 2), n, 1):
    seq(a(n), n=0..20);
  • Mathematica
    b[n_, i_, t_]:= b[n, i, t] = Function[{m, jm}, If[n>m, 0, If[n==m, 1, Sum[b[n-j, i-t, 1-t], {j, 0, jm}]]]][i*(i+1-t), Min[i, n]]; a[n_]:=  b[Quotient[n^2, 2], n, 1]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Aug 09 2017, translated from Maple *)

Formula

a(n) = A290057(n,floor(n^2/2)).
a(n) ~ 6*sqrt(Pi) * n^(2*n+1/2) / exp(2*n). - Vaclav Kotesovec, Jul 22 2017

A290133 Number of unique X-rays of n X n binary matrices with exactly n ones.

Original entry on oeis.org

1, 1, 2, 5, 8, 13, 21, 31, 45, 65, 92, 127, 175, 237, 318, 425, 561, 735, 959, 1241, 1597, 2047, 2607, 3305, 4174, 5247, 6569, 8197, 10189, 12621, 15588, 19189, 23551, 28829, 35189, 42841, 52033, 63039, 76197, 91903, 110603, 132831, 159215, 190463, 227416
Offset: 0

Views

Author

Alois P. Heinz, Jul 20 2017

Keywords

Comments

The X-ray of a matrix is defined as the sequence of antidiagonal sums.
A unique X-ray allows reconstruction of the binary matrix.

Examples

			a(3) = 5: 00021, 00300, 02001, 10020, 12000.
a(4) = 8: 0000301, 0004000, 0030001, 0200020, 1000021, 1000300, 1030000, 1200001.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; (m-> `if`(n>m, 0,
          `if`(n=m or n=0, 1, add(b(n-i*j, min(n-i*j, i-1))*
          `if`(j=1, 2, 1), j=0..min(2, n/i)))))(i*(i+1))
        end:
    a:= n-> `if`(n=0, 1, 1+b(n, n-1)) :
    seq(a(n), n=0..60);
  • Mathematica
    b[n_, i_] := b[n, i] = Function [m, If[n > m, 0, If[n == m || n == 0, 1, Sum[b[n - i*j, Min[n - i*j, i - 1]]*If[j == 1, 2, 1], {j, 0, Min[2, n/i]} ]]]][i*(i + 1)];
    a[n_] := If[n == 0, 1, 1 + b[n, n - 1]] ;
    Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Nov 07 2017, after Alois P. Heinz *)

Formula

a(n) ~ exp(Pi*sqrt(2*n/3)) / (2^(9/4) * 3^(1/4) * n^(3/4)). - Vaclav Kotesovec, May 06 2018
Showing 1-2 of 2 results.