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.

A095800 Triangle T(n,k) = abs( k *( (2*n+1)*(-1)^(n+k)+2*k-1) /4 ) read by rows, 1<=k<=n.

Original entry on oeis.org

1, 1, 4, 2, 2, 9, 2, 6, 3, 16, 3, 4, 12, 4, 25, 3, 8, 6, 20, 5, 36, 4, 6, 15, 8, 30, 6, 49, 4, 10, 9, 24, 10, 42, 7, 64, 5, 8, 18, 12, 35, 12, 56, 8, 81, 5, 12, 12, 28, 15, 48, 14, 72, 9, 100, 6, 10, 21, 16, 40, 18, 63, 16, 90, 10, 121, 6, 14, 15, 32, 20, 54, 21, 80, 18, 110, 11, 144, 7, 12, 24, 20, 45, 24, 70, 24, 99, 20, 132
Offset: 1

Views

Author

Gary W. Adamson, Jun 07 2004

Keywords

Comments

1. Triangles of increasing sizes are subdivided using a triangular array. Then as shown on p. 83 of Conway and Guy, the series A002717 (1, 5, 13, 27, 48, 78, 118...) denotes the total number of triangles in each figure.
2. As a conjecture, each row of A095800 could be a distribution governing distinct subsets of types of triangles having the sum in the "How Many Triangles" series A002717. Thus 1 = 1; 5 = (1 + 4), 13 = (2 + 2 + 9)...etc.
3. Powers of the matrices have alternating signs such that odd rows begin with (+) and even rows begin with (-), as: 1; -1, 4; 2, -2, 9; -2, 6, -3, 16; 3, -4, 12, -4, 25;... Signed row sums = A049778: 1, 3, 9, 17, 32, 48...

Examples

			1. [1 0 0 / 1 -2 0 / 1 -2 3]^2 = [1 0 0 / 1 -4 0 / 2 -2 9]. Then change the (-) signs to (+) getting the first 3 rows of the triangle:
1;
1, 4;
2, 2, 9;
2, 6, 3, 16;
		

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, Springer-Verlag New York, 1996, p. 83.

Crossrefs

Cf. A002717 (row sums), A049778.

Programs

  • Maple
    A095800 := proc(n,k) k/4*( (2*n+1)*(-1)^(n+k)+2*k-1) ; abs(%) ; end proc:
    seq(seq(A095800(n,k),k=1..n),n=1..16) ; # R. J. Mathar, Apr 17 2011
  • PARI
    T(n,k) = abs( k *( (2*n+1)*(-1)^(n+k)+2*k-1) /4 );
    for(n=1,20,for(m=1,n,print1(T(n,m),", ")));
    \\ Joerg Arndt, Mar 05 2014
    
  • Python
    # Generates the b-file
    i=1
    for n in range(1,126):
        for k in range(1,n+1):
            print(str(i)+" "+str(abs(k*((2*n+1)*(-1)**(n+k)+2*k-1)//4)))
            i+=1 # Indranil Ghosh, Feb 17 2017

Formula

Let M(n,k) = (-1)^(k+1)*k, 1<=k<=n be the infinite lower triangular matrix with 1, -2, 3,.. up to the diagonal, and the upper triangular part all zeros. The 3x3 submatrix would be [1 0 0 / 1 -2 0 / 1 -2 3]. The current triangle contains the absolute values of the matrix square M^2.

Extensions

Replaced NAME by closed form and inserted a missing row. - R. J. Mathar, Apr 17 2011