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.

A238872 Number of strongly unimodal compositions of n with absolute difference of successive parts = 1.

This page as a plain text file.
%I A238872 #30 Jul 13 2021 04:06:46
%S A238872 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 A238872 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 A238872 15,13,6,21,12,12,13,6,11,15,15,9,14,12,8,24,10,9
%N A238872 Number of strongly unimodal compositions of n with absolute difference of successive parts = 1.
%H A238872 Alois P. Heinz, <a href="/A238872/b238872.txt">Table of n, a(n) for n = 0..10000</a>
%H A238872 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 A238872 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 A238872 The a(33) = 15 such compositions of 33 are:
%e A238872 01:  [ 1 2 3 4 5 6 5 4 3 ]
%e A238872 02:  [ 2 3 4 5 6 7 6 ]
%e A238872 03:  [ 3 4 5 6 5 4 3 2 1 ]
%e A238872 04:  [ 3 4 5 6 7 8 ]
%e A238872 05:  [ 4 5 6 7 6 5 ]
%e A238872 06:  [ 5 6 7 6 5 4 ]
%e A238872 07:  [ 5 6 7 8 7 ]
%e A238872 08:  [ 6 7 6 5 4 3 2 ]
%e A238872 09:  [ 7 8 7 6 5 ]
%e A238872 10:  [ 8 7 6 5 4 3 ]
%e A238872 11:  [ 10 11 12 ]
%e A238872 12:  [ 12 11 10 ]
%e A238872 13:  [ 16 17 ]
%e A238872 14:  [ 17 16 ]
%e A238872 15:  [ 33 ]
%e A238872 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 A238872 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 A238872 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 A238872 (PARI) \\ generate the compositions
%o A238872 a(n)=
%o A238872 {
%o A238872     if ( n==0, return(1) );
%o A238872     my( ret=0 );
%o A238872     my( as, ts );
%o A238872     for (f=1, n,  \\ first part
%o A238872         as = 0;
%o A238872         for (p=f, n, \\ numper of parts in rising half
%o A238872             as += p; \\ ascending sum
%o A238872             if ( as > n, break() );
%o A238872             if ( as == n,  ret+=1;  break() );
%o A238872             ts = as;  \\ total sum
%o A238872             forstep (q=p-1, 1, -1,
%o A238872                 ts += q;  \\ descending sum
%o A238872                 if ( ts > n, break() );
%o A238872                 if ( ts == n,  ret+=1;  break() );
%o A238872             );
%o A238872         );
%o A238872     );
%o A238872     return( ret );
%o A238872 }
%o A238872 v=vector(100,n,a(n-1))
%Y A238872 Cf. A001522, A001523, A005169, A034297, A059618, A238870, A238871, A130695.
%K A238872 nonn
%O A238872 0,4
%A A238872 _Joerg Arndt_, Mar 21 2014