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.

A085691 Triangle read by rows: T(n,k) is the number of triangles of side k in triangular matchstick arrangement of side n; n>=1 and k>=1.

Original entry on oeis.org

1, 4, 1, 9, 3, 1, 16, 7, 3, 1, 25, 13, 6, 3, 1, 36, 21, 11, 6, 3, 1, 49, 31, 18, 10, 6, 3, 1, 64, 43, 27, 16, 10, 6, 3, 1, 81, 57, 38, 24, 15, 10, 6, 3, 1, 100, 73, 51, 34, 22, 15, 10, 6, 3, 1, 121, 91, 66, 46, 31, 21, 15, 10, 6, 3, 1, 144, 111, 83, 60, 42, 29, 21, 15, 10, 6, 3, 1
Offset: 1

Views

Author

Philippe Deléham, Jul 18 2003

Keywords

Comments

Sub-triangles can be oriented in one of two ways. The number of sub-triangles that are oriented in the same way as the full triangle is binomial(n-k+2, 2). For k <= n/2, there are also sub-triangles oriented at 180 degrees and the number of these is binomial(n-2*k+2, 2). - Andrew Howroyd, Jan 06 2020
The matchstick arrangement consists of 3*A000217(n) matchsticks. One can also consider it as a tower of cards with n base cards. - Wolfdieter Lang, Apr 06 2020

Examples

			Triangle begins:
    1;
    4,  1;
    9,  3,  1;
   16,  7,  3,  1;
   25, 13,  6,  3,  1;
   36, 21, 11,  6,  3,  1;
   49, 31, 18, 10,  6,  3,  1;
   64, 43, 27, 16, 10,  6,  3, 1;
   81, 57, 38, 24, 15, 10,  6, 3, 1;
  100, 73, 51, 34, 22, 15, 10, 6, 3, 1;
  ...
From _Andrew Howroyd_, Jan 05 2020: (Start)
Row n=3: In the triangle illustrated below there are 9 small triangles, 3 triangles with side length 2 and 1 with side length 3.
            o
           / \
          o---o
         / \ / \
        o---o---o
       / \ / \ / \
      o---o---o---o
(End)
		

References

  • J. H. Conway and R. K. Guy, The Book of Numbers, Copernicus Press, NY, 1996, p. 83.

Crossrefs

Row sums are A002717.
Columns k=1..3 are A000290, A002061, A010000.

Programs

  • PARI
    T(n, k)={binomial(n-k+2, 2) + if(2*k<=n, binomial(n-2*k+2, 2), 0)} \\ Andrew Howroyd, Jan 06 2020
    
  • PARI
    T(n, k)={if(k>n, 0, if(2*k > n, (n-k+1)*(n-k+2)/2, n^2 - 3*(k-1)*n + (5*k-4)*(k-1)/2))} \\ Andrew Howroyd, Jan 06 2020

Formula

T(n, k) = 0 for n < k; T(n, k) = (n-k+1)*(n-k+2)/2 for k <= n < 2*k; T(n, k) = n^2 - 3*(k-1)*n + (5*k-4)*(k-1)/2 for 2*k <= n.
T(n, k) = Tup(n, k) + Tdown(n, k), with Tup(n, k) = (-1)*(n-k)*A122432(n-1, k-1) and Tdown(n, k) = A332442(n, k), for n >= 1, and k = 1, 2, ..., n. - Wolfdieter Lang, Apr 06 2020

Extensions

Offset corrected and terms a(37) and beyond from Andrew Howroyd, Jan 05 2020