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.

A316384 Number of ways to stack n triangles symmetrically in a valley (pointing upwards or downwards depending on row parity).

Original entry on oeis.org

1, 1, 1, 0, 1, 0, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 4, 2, 5, 2, 5, 2, 6, 3, 8, 4, 9, 4, 10, 4, 12, 6, 15, 7, 17, 7, 19, 8, 22, 10, 26, 12, 30, 13, 33, 14, 38, 17, 45, 21, 51, 22, 56, 24, 64, 29, 74, 33, 83, 36, 92, 40, 104, 46, 119, 53, 133, 58, 147, 63, 165, 73, 187, 83, 208, 90
Offset: 0

Views

Author

Seiichi Manyama, Jun 30 2018

Keywords

Comments

*
/ \
*-*-*-*-*
\ / \ /
*---*
\ /
*
Such a way to stack is not allowed.
From George Beck, Jul 28 2023: (Start)
Equivalently, a(n) is the number of partitions of n such that the 2-modular Ferrers diagram is symmetric.
The first example for n = 16 below corresponds to the partition 9 + 2 + 2 + 2 + 1 with 2-modular Ferrers diagram:
2 2 2 2 1
2
2
2
1
(End)

Examples

			a(16) = 4.
                                 *   *
                                / \ / \
     *---*---*---*---*         *---*---*
      \ / \ / \ / \ /         / \ / \ / \
       *---*---*---*         *---*---*---*
        \ / \ / \ /           \ / \ / \ /
         *---*---*             *---*---*
          \ / \ /               \ / \ /
           *---*                 *---*
            \ /                   \ /
             *                     *
   *---*           *---*     *           *
    \ / \         / \ /     / \         / \
     *---*       *---*     *---*   *   *---*
      \ / \     / \ /       \ / \ / \ / \ /
       *---*   *---*         *---*---*---*
        \ / \ / \ /           \ / \ / \ /
         *---*---*             *---*---*
          \ / \ /               \ / \ /
           *---*                 *---*
            \ /                   \ /
             *                     *
a(17) = 2.
           *---*         *---*           *---*
          / \ / \         \ / \         / \ /
         *---*---*         *---*       *---*
        / \ / \ / \         \ / \     / \ /
       *---*---*---*         *---*---*---*
        \ / \ / \ /           \ / \ / \ /
         *---*---*             *---*---*
          \ / \ /               \ / \ /
           *---*                 *---*
            \ /                   \ /
             *                     *
		

Crossrefs

Cf. A000700 (number of symmetric Ferrers graphs with n nodes), A006950 (number of ways to stack n triangles in a valley), A029838, A036015, A036016, A082303.

Programs

  • Mathematica
    nmax = 100; CoefficientList[Series[(QPochhammer[x^6, x^16]*QPochhammer[x^10, x^16] + x*QPochhammer[x^2, x^16]*QPochhammer[x^14, x^16])/(QPochhammer[x^2, x^4] * QPochhammer[x^8, x^16]), {x, 0, nmax}], x] (* Vaclav Kotesovec, Feb 08 2023 *)
  • Ruby
    def s(k, n)
      s = 0
      (1..n).each{|i| s += i if n % i == 0 && i % k == 0}
      s
    end
    def A(ary, n)
      a_ary = [1]
      a = [0] + (1..n).map{|i| ary.inject(0){|s, j| s + j[1] * s(j[0], i)}}
      (1..n).each{|i| a_ary << (1..i).inject(0){|s, j| s - a[j] * a_ary[-j]} / i}
      a_ary
    end
    def A316384(n)
      A([[1, 1], [4, -1]], n).map{|i| i.abs}
    end
    p A316384(100)

Formula

a(2n+1) = A036015(n).
a(2n ) = A036016(n).
a(n) = |A029838(n)| = |A082303(n)|.
Euler transform of period 16 sequence [1, 0, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 0, 1, 0, ...].
a(n) ~ sqrt(sqrt(2) + (-1)^n) * exp(Pi*sqrt(n)/2^(3/2)) / (4*n^(3/4)). - Vaclav Kotesovec, Feb 08 2023
G.f.: Product_{k>=1} 1/((1 - x^(16*k-2))*(1 - x^(16*k-8))*(1 - x^(16*k-14))) + x*Product_{k>=1} 1/((1 - x^(16*k-6))*(1 - x^(16*k-8))*(1 - x^(16*k-10))). - Vaclav Kotesovec, Feb 08 2023