%I #30 Jul 13 2021 04:06:46
%S 1,1,1,3,2,3,3,4,3,6,4,3,5,6,4,9,5,3,7,7,5,9,6,6,8,9,5,9,8,6,10,6,5,
%T 15,8,9,10,7,7,12,10,3,11,15,7,15,8,6,13,12,9,12,9,9,14,12,7,15,12,6,
%U 15,13,6,21,12,12,13,6,11,15,15,9,14,12,8,24,10,9
%N Number of strongly unimodal compositions of n with absolute difference of successive parts = 1.
%H Alois P. Heinz, <a href="/A238872/b238872.txt">Table of n, a(n) for n = 0..10000</a>
%H Dandan Chen and Rong Chen, <a href="https://arxiv.org/abs/2107.04809">Generating Functions of the Hurwitz Class Numbers Associated with Certain Mock Theta Functions</a>, arXiv:2107.04809 [math.NT], 2021.
%F a(2*n) = A130695(2*n) / 3 if n>0. a(2*n + 1) = A130695(2*n + 1) = 3 * H(8*n + 3), where H is the Hurwitz class number, if n>0. - _Michael Somos_, Jul 04 2015
%e The a(33) = 15 such compositions of 33 are:
%e 01: [ 1 2 3 4 5 6 5 4 3 ]
%e 02: [ 2 3 4 5 6 7 6 ]
%e 03: [ 3 4 5 6 5 4 3 2 1 ]
%e 04: [ 3 4 5 6 7 8 ]
%e 05: [ 4 5 6 7 6 5 ]
%e 06: [ 5 6 7 6 5 4 ]
%e 07: [ 5 6 7 8 7 ]
%e 08: [ 6 7 6 5 4 3 2 ]
%e 09: [ 7 8 7 6 5 ]
%e 10: [ 8 7 6 5 4 3 ]
%e 11: [ 10 11 12 ]
%e 12: [ 12 11 10 ]
%e 13: [ 16 17 ]
%e 14: [ 17 16 ]
%e 15: [ 33 ]
%e G.f. = 1 + x + x^2 + 3*x^3 + 2*x^4 + 3*x^5 + 3*x^6 + 4*x^7 + 3*x^8 + 6*x^9 + ...
%t a[ n_] := If[ n < 1, Boole[n == 0], If[ OddQ[n], 1, 1/3] Length @ FindInstance[ {x >= 0, y >= 0, z >= 0, x y + y z + z x + x + y + z + 1 == n}, {x, y, z}, Integers, 10^9]]; (* _Michael Somos_, Jul 04 2015 *)
%t a[ n_] := If[ n < 1, Boole[n == 0], Length @ FindInstance[ {1 <= y <= n, 1 <= x <= y, 1 <= z <= y, y^2 + (x - x^2 + z - z^2) / 2 == n}, {x, y, z}, Integers, 10^9]]; (* _Michael Somos_, Jul 04 2015 *)
%o (PARI) \\ generate the compositions
%o a(n)=
%o {
%o if ( n==0, return(1) );
%o my( ret=0 );
%o my( as, ts );
%o for (f=1, n, \\ first part
%o as = 0;
%o for (p=f, n, \\ numper of parts in rising half
%o as += p; \\ ascending sum
%o if ( as > n, break() );
%o if ( as == n, ret+=1; break() );
%o ts = as; \\ total sum
%o forstep (q=p-1, 1, -1,
%o ts += q; \\ descending sum
%o if ( ts > n, break() );
%o if ( ts == n, ret+=1; break() );
%o );
%o );
%o );
%o return( ret );
%o }
%o v=vector(100,n,a(n-1))
%Y Cf. A001522, A001523, A005169, A034297, A059618, A238870, A238871, A130695.
%K nonn
%O 0,4
%A _Joerg Arndt_, Mar 21 2014
|