A316384 Number of ways to stack n triangles symmetrically in a valley (pointing upwards or downwards depending on row parity).
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
Keywords
Examples
a(16) = 4. * * / \ / \ *---*---*---*---* *---*---* \ / \ / \ / \ / / \ / \ / \ *---*---*---* *---*---*---* \ / \ / \ / \ / \ / \ / *---*---* *---*---* \ / \ / \ / \ / *---* *---* \ / \ / * * *---* *---* * * \ / \ / \ / / \ / \ *---* *---* *---* * *---* \ / \ / \ / \ / \ / \ / \ / *---* *---* *---*---*---* \ / \ / \ / \ / \ / \ / *---*---* *---*---* \ / \ / \ / \ / *---* *---* \ / \ / * * a(17) = 2. *---* *---* *---* / \ / \ \ / \ / \ / *---*---* *---* *---* / \ / \ / \ \ / \ / \ / *---*---*---* *---*---*---* \ / \ / \ / \ / \ / \ / *---*---* *---*---* \ / \ / \ / \ / *---* *---* \ / \ / * *
Links
- Seiichi Manyama, Table of n, a(n) for n = 0..10000
Crossrefs
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).
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
Comments