A095800 Triangle T(n,k) = abs( k *( (2*n+1)*(-1)^(n+k)+2*k-1) /4 ) read by rows, 1<=k<=n.
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
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.
Links
- Indranil Ghosh, Rows 1..125, flattened
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
Comments