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-5 of 5 results.

A143976 Rectangular array R by antidiagonals: label each unit square in the first quadrant lattice by its northeast vertex (x,y) and mark squares having x + y == 1 (mod 3); then R(m,n) is the number of UNmarked squares in the rectangle [0,m] X [0,n].

Original entry on oeis.org

1, 2, 2, 2, 3, 2, 3, 4, 4, 3, 4, 6, 6, 6, 4, 4, 7, 8, 8, 7, 4, 5, 8, 10, 11, 10, 8, 5, 6, 10, 12, 14, 14, 12, 10, 6, 6, 11, 14, 16, 17, 16, 14, 11, 6, 7, 12, 16, 19, 20, 20, 19, 16, 12, 7, 8, 14, 18, 22, 24, 24, 24, 22, 18, 14, 8, 8, 15, 20, 24, 27, 28, 28, 27, 24, 20, 15, 8
Offset: 1

Views

Author

Clark Kimberling, Sep 06 2008

Keywords

Comments

Rows numbered 3,6,9,12,15,... are, except for initial terms, multiples of (1,2,3,4,5,6,7,...) = A000027.

Examples

			Northwest corner:
  1  2  2  3  4  4  5
  2  3  4  6  7  8 10
  2  4  6  8 10 12 14
  3  6  8 11 14 16 18
  4  7 10 14 17 20 24
See A143974.
		

Crossrefs

Rows: A004523, A004772, A005843, A047399, et al.
Main diagonal: A071619.

Programs

  • Mathematica
    T[m_,n_]:=m*n-Floor[m*n/3]; Flatten[Table[T[n-k+1,k],{n,12},{k,n}]] (* Stefano Spezia, Oct 25 2022 *)

Formula

R(m,n) = m*n - floor(m*n/3).

A143974 Rectangular array R by antidiagonals: label each unit square in the first quadrant lattice by its northeast vertex (x,y) and mark those having x+y=1(mod 3); then R(m,n) is the number of marked unit squares in the rectangle [0,m]x[0,n].

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 1, 2, 2, 1, 1, 2, 3, 2, 1, 2, 3, 4, 4, 3, 2, 2, 4, 5, 5, 5, 4, 2, 2, 4, 6, 6, 6, 6, 4, 2, 3, 5, 7, 8, 8, 8, 7, 5, 3, 3, 6, 8, 9, 10, 10, 9, 8, 6, 3, 3, 6, 9, 10, 11, 12, 11, 10, 9, 6, 3, 4, 7, 10, 12, 13, 14, 14, 13, 12, 10, 7, 4, 4, 8, 11, 13, 15, 16, 16, 16, 15, 13, 11, 8, 4, 4, 8
Offset: 1

Views

Author

Clark Kimberling, Sep 06 2008

Keywords

Comments

Examples

			Northwest corner:
0 0 1 1 1 2
0 1 2 2 3 4
1 2 3 4 5 6
1 2 4 5 6 8
1 3 5 6 8 10
R(3,4) counts these marked squares: (1,3), (2,2), (3,1), (3,4).
		

Crossrefs

Formula

R(m,n)=floor(mn/3).

A143979 Rectangular array R by antidiagonals: label each unit square in the first quadrant lattice by its northeast vertex (x,y) and mark squares having |x-y| = 0 (mod 3); then R(m,n) is the number of UNmarked squares in the rectangle [0,m] X [0,n].

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 2, 4, 4, 2, 3, 5, 6, 5, 3, 4, 6, 8, 8, 6, 4, 4, 8, 10, 10, 10, 8, 4, 5, 9, 12, 13, 13, 12, 9, 5, 6, 10, 14, 16, 16, 16, 14, 10, 6, 6, 12, 16, 18, 20, 20, 18, 16, 12, 6, 7, 13, 18, 21, 23, 24, 23, 21, 18, 13, 7, 8, 14, 20, 24, 26, 28, 28, 26, 24, 20, 14, 8
Offset: 1

Views

Author

Clark Kimberling, Sep 06 2008

Keywords

Comments

Rows numbered 3,6,9,12,15,... are, except for initial terms, multiples of (1,2,3,4,5,6,7,...)=A000027.

Examples

			Northwest corner:
  0 1  2  2  3  4  4
  1 2  4  5  6  8  9
  2 4  6  8 10 12 14
  2 5  8 10 13 16 18
  3 6 10 13 16 20 23
		

Crossrefs

Programs

  • Mathematica
    T[i_,j_]:=i*j-Ceiling[i*j/3]; Flatten[Table[T[m-n+1,n],{m,12},{n,m}]] (* Stefano Spezia, Oct 28 2022 *)

Formula

R(m,n) = m*n - ceiling(m*n/3). [Corrected by Stefano Spezia, Oct 28 2022]

A358161 a(n) is the permanent of the n X n matrix M(n) that is defined by M[i,j] = ceiling(i*j/3).

Original entry on oeis.org

1, 1, 3, 19, 434, 18142, 1138592, 131646240, 22247821152, 4990553682336, 1661493079305216, 729074911776673536, 397903630707426852864, 290086114501734871449600, 262660633302518916820992000, 284075108357948520100761600000, 385808192325346588875691868160000, 626209817056857125529475382231040000
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 A143977.
det(M(n)) = 1 for n <= 3, and otherwise det(M(n)) = 0.

Examples

			a(5) = 18142:
    1  1  1  2  2
    1  2  2  3  4
    1  2  3  4  5
    2  3  4  6  7
    2  4  5  7  9
		

Crossrefs

Cf. A143977.
Cf. A008810 (matrix element M[n,n]), A070333 (trace of M(n+1)), A358162 (hafnian of M(2*n)).

Programs

  • Mathematica
    a[n_]:=Permanent[Table[Ceiling[i j/3],{i,n},{j,n}]]; Join[{1},Array[a,17]]
  • Python
    from fractions import Fraction
    from sympy import Matrix
    def A358161(n): return Matrix(n,n,[Fraction(i*j,3)._ceil_() for i in range(1,n+1) for j in range(1,n+1)]).per() if n else 1 # Chai Wah Wu, Nov 02 2022

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

Original entry on oeis.org

1, 1, 11, 530, 71196, 18680148, 8825763888, 6969574132560, 8223753750015600, 14043461354695317600, 33726601900489760438400
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 A143977.

Examples

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

Crossrefs

Cf. A143977.
Cf. A008810 (matrix element M[n,n]), A070333 (trace of M(n)), A358161 (permanent of M(n)).

Programs

  • Mathematica
    M[i_, j_, n_]:=Part[Part[Table[Ceiling[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, ceil((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
Showing 1-5 of 5 results.