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

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).

A143977 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 marked squares in the rectangle [0,m] X [0,n].

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 3, 3, 3, 2, 2, 4, 4, 4, 4, 2, 3, 4, 5, 6, 5, 4, 3, 3, 5, 6, 7, 7, 6, 5, 3, 3, 6, 7, 8, 9, 8, 7, 6, 3, 4, 6, 8, 10, 10, 10, 10, 8, 6, 4, 4, 7, 9, 11, 12, 12, 12, 11, 9, 7, 4, 4, 8, 10, 12, 14, 14, 14, 14, 12, 10, 8, 4, 5, 8, 11, 14, 15, 16, 17, 16, 15, 14, 11, 8, 5
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  1  1  2  2  2  3
  1  2  2  3  4  4  5
  1  2  3  4  5  6  7
  2  3  4  6  7  8 10
  2  4  5  7  9 10 12
		

Crossrefs

Rows and columns: A002264, A004523, A000027, A004772, A047212, et al.

Programs

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

Formula

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

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]

A358042 Partial sums of A071619.

Original entry on oeis.org

0, 1, 4, 10, 21, 38, 62, 95, 138, 192, 259, 340, 436, 549, 680, 830, 1001, 1194, 1410, 1651, 1918, 2212, 2535, 2888, 3272, 3689, 4140, 4626, 5149, 5710, 6310, 6951, 7634, 8360, 9131, 9948, 10812, 11725, 12688, 13702, 14769, 15890, 17066, 18299, 19590, 20940, 22351
Offset: 0

Views

Author

Stefano Spezia, Oct 26 2022

Keywords

Crossrefs

Partial sums of the main diagonal of A143976.
Cf. A042968 (2nd differences), A071619 (1st differences).

Programs

  • Mathematica
    LinearRecurrence[{3,-3,2,-3,3,-1},{0,1,4,10,21,38},47]

Formula

O.g.f.: x*(1 + x)*(1 + x^2)/((1 + x + x^2)*(1 - x)^4).
a(n) = 3*a(n-1) - 3*a(n-2) + 2*a(n-3) - 3*a(n-4) + 3*a(n-5) - a(n-6) for n > 5.
a(n) = (A005898(n) - A049347(n))/9.
E.g.f.: exp(-x/2)*(3*exp(3*x/2)*(1 + 8*x + 9*x^2 + 2*x^3) - 3*cos(sqrt(3)*x/2) - sqrt(3)*sin(sqrt(3)*x/2))/27.

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

Original entry on oeis.org

1, 1, 7, 102, 4396, 374216, 49857920, 11344877568, 3879729283968, 1804571320405248, 1195546731955854336, 1058730877124859138048, 1184751018265831288602624, 1725335046543668616765112320, 3147123030650561978295975936000, 6934187745940804400441946931200000, 18840570649600136750602236509552640000
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 and it is singular for n > 3.

Examples

			a(5) = 374216:
    1   2   2   3   4
    2   3   4   6   7
    2   4   6   8  10
    3   6   8  11  14
    4   7  10  14  17
		

Crossrefs

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

Programs

  • Mathematica
    Join[{1},Table[Permanent[Table[i*j-Floor[i*j/3],{i,n},{j,n}]],{n,17}]]
  • Python
    from sympy import Matrix
    def A358159(n): return Matrix(n,n,[i*j-i*j//3 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

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
Showing 1-6 of 6 results.