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.

A214595 T(n,k) = number of n X n X n triangular 0..k arrays with every horizontal row having the same average value.

Original entry on oeis.org

2, 3, 2, 4, 5, 2, 5, 8, 23, 2, 6, 13, 62, 401, 2, 7, 18, 157, 1862, 20351, 2, 8, 25, 312, 10177, 187862, 2869211, 2, 9, 32, 601, 33352, 3330677, 63120962, 1127599139, 2, 10, 41, 986, 103651, 20608352, 5495329427, 71200442882, 1248252244661, 2, 11, 50, 1619
Offset: 1

Views

Author

R. H. Hardin, Jul 22 2012

Keywords

Examples

			Table starts
.2.....3......4.......5........6.........7.........8..........9.........10
.2.....5......8......13.......18........25........32.........41.........50
.2....23.....62.....157......312.......601.......986.......1619.......2426
.2...401...1862...10177....33352....103651....250042.....589763....1199614
.2.20351.187862.3330677.20608352.121537201.493575042.1877543213.5767190924
Some solutions for n = k = 4:
.....2........1........2........2........2........2........2........2
....3.1......0.2......2.2......3.1......2.2......1.3......4.0......4.0
...3.2.1....0.3.0....3.2.1....2.4.0....0.2.4....3.0.3....1.2.3....4.0.2
..2.2.3.1..2.1.0.1..1.2.4.1..4.2.2.0..1.4.3.0..4.0.2.2..3.2.3.0..4.0.4.0
		

Crossrefs

Row 2 is A000982(n+1). Other rows: A214596, A214597, A214598.

Programs

  • PARI
    /* helper function  mult() gives multiplicity of a composition */
    mult(p, L=1, m=(#p)!)={for(k=2,#p, p[k]!=p[k-1] && m\=(-L+L=k)!); m\(#p-L+1)!}
    A214595(n, k)={sum(a=1,k, prod(L=2,n, my(c=0); forpart(p=L*a, c+=mult(p), [0,k], L); c))+1} \\ M. F. Hasler, Aug 21 2025

Formula

Empirical for row n:
n=1: a(k)=2*a(k-1)-a(k-2)
n=2: a(k)=2*a(k-1)-2*a(k-3)+a(k-4)
n=3: (order 12 antisymmetric)
n=4: (order 32 symmetric)
n=5: (order 84 symmetric)
T(n, k) = Sum_{s=0..k} Product_{L=2..n} NC(s*L, L, k), where NC(s, n, k) is the number of compositions of sum s with n parts between 0 and k. - M. F. Hasler, Aug 21 2025