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

A362187 a(n) = (n^2 - n)!.

Original entry on oeis.org

1, 1, 2, 720, 479001600, 2432902008176640000, 265252859812191058636308480000000, 1405006117752879898543142606244511569936384000000000, 710998587804863451854045647463724949736497978881168458687447040000000000000
Offset: 0

Views

Author

Stefano Spezia, Apr 10 2023

Keywords

Comments

The next term has 104 digits.
For n > 0, a(n) is the number of n X n matrices using all the integers from 1 to n^2 and having the main diagonal given.

Crossrefs

Programs

  • Mathematica
    a[n_]:=(n^2-n)!; Array[a,9,0]

Formula

a(n) = (n^2 - n)*a(n-1) for n > 1.
a(n) = A000142(A002378(n-1)) for n > 0.

A362208 Irregular triangle read by rows: T(n, k) is the number of compositions (ordered partitions) of n into exactly k distinct parts between the members of [k^2].

Original entry on oeis.org

1, 0, 0, 2, 0, 2, 0, 4, 0, 2, 6, 0, 2, 6, 0, 0, 12, 0, 0, 18, 0, 0, 24, 24, 0, 0, 30, 24, 0, 0, 42, 48, 0, 0, 42, 72, 0, 0, 48, 120, 0, 0, 48, 144, 120, 0, 0, 48, 216, 120, 0, 0, 42, 264, 240, 0, 0, 42, 360, 360, 0, 0, 30, 432, 600, 0, 0, 24, 552, 840, 0, 0, 18, 648, 1200, 720
Offset: 1

Views

Author

Stefano Spezia, Apr 11 2023

Keywords

Examples

			The irregular triangle begins:
    1;
    0;
    0, 2;
    0, 2;
    0, 4;
    0, 2,  6;
    0, 2,  6;
    0, 0, 12;
    0, 0, 18;
    0, 0, 24,  24;
    0, 0, 30,  24;
    0, 0, 42,  48;
    0, 0, 42,  72;
    0, 0, 48, 120;
    0, 0, 48, 144, 120;
    ...
T(7,3) = 6 since we have: 1+2+4, 1+4+2, 2+1+4, 2+4+1, 4+1+2, 4+2+1.
		

Crossrefs

Cf. A000290, A003056 (row lengths), A072574, A216652.
Cf. A362209, A362221 (unordered partitions).

Programs

  • Mathematica
    Flatten[Table[Length[Select[Join@@Permutations/@Select[IntegerPartitions[n,All,Range[k^2]], UnsameQ@@#&], Length[#]==k&]], {n, 21}, {k, Floor[(Sqrt[8n+1]-1)/2]}]] (* After Gus Wiseman in A072574 *)

A362280 a(n) is the number of n X n matrices using all the integers from 1 to n^2 with trace equal to the antitrace.

Original entry on oeis.org

1, 8, 32640, 606108303360, 288646869784585568256000, 3978466023641262138239999300075520000000, 4808293482959682489757553576215163849442438886195200000000000, 669887741948823664389458168162886859168459418141304785844082510440658108416000000000000
Offset: 1

Views

Author

Keywords

Examples

			a(1) = A362209(1,1) = 1 since we have:
     [1].
a(2) = A362209(5,2) = 8 since we have:
     [1, 2]  [1, 3]  [4, 2]  [4, 3]
     [3, 4], [2, 4], [3, 1], [2, 1],
.
     [2, 1]  [2, 4]  [3, 1]  [3, 4]
     [4, 3], [1, 3], [4, 2], [1, 2].
		

Crossrefs

Programs

  • Python
    from math import factorial
    from itertools import combinations as C
    def a(n):
        E = [i for i in range(1, n**2+1)]
        m = n if n%2 == 0 else n-1
        r = n**2 - 2*m
        fm, fr = factorial(m), factorial(r)
        p = fm**2 * fr
        return p*sum(1 for u in C(E, 2*m) for t in C(u, m) if 2*sum(t)==sum(u))
    print([a(n) for n in range(1, 5)])

Formula

a(n) = A362291(n)*(m!)^2*(n^2 - 2*m)!, where m = 2*floor(n/2).

Extensions

a(6)-a(8) calculated from A362291 by Martin Ehrenstein, Apr 25 2023
Showing 1-3 of 3 results.