%I #123 Jul 29 2023 05:04:21
%S 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,
%T 7,17,7,19,8,22,10,26,12,30,13,33,14,38,17,45,21,51,22,56,24,64,29,74,
%U 33,83,36,92,40,104,46,119,53,133,58,147,63,165,73,187,83,208,90
%N Number of ways to stack n triangles symmetrically in a valley (pointing upwards or downwards depending on row parity).
%C *
%C / \
%C *-*-*-*-*
%C \ / \ /
%C *---*
%C \ /
%C *
%C Such a way to stack is not allowed.
%C From _George Beck_, Jul 28 2023: (Start)
%C Equivalently, a(n) is the number of partitions of n such that the 2-modular Ferrers diagram is symmetric.
%C The first example for n = 16 below corresponds to the partition 9 + 2 + 2 + 2 + 1 with 2-modular Ferrers diagram:
%C 2 2 2 2 1
%C 2
%C 2
%C 2
%C 1
%C (End)
%H Seiichi Manyama, <a href="/A316384/b316384.txt">Table of n, a(n) for n = 0..10000</a>
%F a(2n+1) = A036015(n).
%F a(2n ) = A036016(n).
%F a(n) = |A029838(n)| = |A082303(n)|.
%F Euler transform of period 16 sequence [1, 0, -1, 1, -1, 1, 1, -1, 1, 1, -1, 1, -1, 0, 1, 0, ...].
%F a(n) ~ sqrt(sqrt(2) + (-1)^n) * exp(Pi*sqrt(n)/2^(3/2)) / (4*n^(3/4)). - _Vaclav Kotesovec_, Feb 08 2023
%F 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
%e a(16) = 4.
%e * *
%e / \ / \
%e *---*---*---*---* *---*---*
%e \ / \ / \ / \ / / \ / \ / \
%e *---*---*---* *---*---*---*
%e \ / \ / \ / \ / \ / \ /
%e *---*---* *---*---*
%e \ / \ / \ / \ /
%e *---* *---*
%e \ / \ /
%e * *
%e *---* *---* * *
%e \ / \ / \ / / \ / \
%e *---* *---* *---* * *---*
%e \ / \ / \ / \ / \ / \ / \ /
%e *---* *---* *---*---*---*
%e \ / \ / \ / \ / \ / \ /
%e *---*---* *---*---*
%e \ / \ / \ / \ /
%e *---* *---*
%e \ / \ /
%e * *
%e a(17) = 2.
%e *---* *---* *---*
%e / \ / \ \ / \ / \ /
%e *---*---* *---* *---*
%e / \ / \ / \ \ / \ / \ /
%e *---*---*---* *---*---*---*
%e \ / \ / \ / \ / \ / \ /
%e *---*---* *---*---*
%e \ / \ / \ / \ /
%e *---* *---*
%e \ / \ /
%e * *
%t 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 *)
%o (Ruby)
%o def s(k, n)
%o s = 0
%o (1..n).each{|i| s += i if n % i == 0 && i % k == 0}
%o s
%o end
%o def A(ary, n)
%o a_ary = [1]
%o a = [0] + (1..n).map{|i| ary.inject(0){|s, j| s + j[1] * s(j[0], i)}}
%o (1..n).each{|i| a_ary << (1..i).inject(0){|s, j| s - a[j] * a_ary[-j]} / i}
%o a_ary
%o end
%o def A316384(n)
%o A([[1, 1], [4, -1]], n).map{|i| i.abs}
%o end
%o p A316384(100)
%Y 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.
%K nonn
%O 0,9
%A _Seiichi Manyama_, Jun 30 2018