OFFSET

0,4

COMMENTS

A stack is formed by starting with a row of triangles pointing upwards, and then additional triangles pointing downwards can be inserted between adjacent triangles pointing upwards, and additional triangles pointing upwards can be put on top of triangles pointing downwards.

Number of compositions of n with a(1) = 1 and a(i+1) <= a(i) + 1 + mod(a(i),2).

From Peter Bala, Jul 12 2019: (Start)

These triangle stacks may be defined using Schröder paths. A Schröder path is a lattice path in the plane starting and ending on the x-axis, never going below the x-axis, using the steps (1,1) rise, (1,-1) fall or (2,0) flat. A small Schröder path is a Schröder path with no flat steps on the x-axis.

The area between a small Schröder path and the x-axis may be decomposed into a stack of unit area triangles of two types - up triangles with vertices at the lattice points (x, y), (x+1, y+1) and (x+2, y) and down triangles with vertices at the lattice points (x, y), (x-1, y+1) and (x+1, y+1). (End)

LINKS

Seiichi Manyama, Table of n, a(n) for n = 0..3694 (terms 0..500 from Paul Tek)

Paul Tek, Illustration of the first terms

FORMULA

From Peter Bala, Jul 03 2019: (Start)

O.g.f. as a continued fraction: A(q) = 1/(1 - q/(1 - q^2 - q^3/(1 - q^4 - q^5/(1 - q^6 - q^7/( ... ) )))). Also,

A(q) = 1/(1 - q/(1 - (q^2 + q^3)/(1 - q^5/(1 - (q^4 + q^7)/(1 - q^9/(1 - (q^6 + q^11)/(1 - q^13/( ... ) ))))))) and

A(q) = 1/(2 - (1 + q)/(2 - (1 + q^3)/(2 - (1 + q^5)/(2 - (1 + q^7)/( ... ) )))).

O.g.f. as a ratio of q-series: A(q) = N(q)/D(q), where N(q) = Sum_{n >= 0} (-1)^n*q^(2*n^2+n)/( (1-q^2)*(1-q^4)*...*(1-q^(2*n)) )^2 and D(q) = Sum_{n >= 0} (-1)^n*q^(2*n^2-n)/( (1-q^2)*(1-q^4)*...*(1-q^(2*n)) )^2.

D(q) has its least (simple) real zero at x = 0.53600 49695 29708 61653 44946 12214 97438 08884 63471 33627....

a(n) ~ c*x^(-n) where c = 0.30516 69461 42293 61432 58334 29163 22891 57284 39056 20388 ... = - N(x)/(x*D'(x)) and the prime indicates differentiation w.r.t. q. (End)

MATHEMATICA

a[ n_] := SeriesCoefficient[ 1/(1 + ContinuedFractionK[ - q^(2 k - 1), 1 - q^(2 k), {k, Ceiling @ Sqrt[n]}]), {q, 0, n}]; (* Michael Somos, Jul 14 2019 *)

PROG

(Perl)

use bigint;

my $max = 100;

my @d = ( [1] );

foreach my $n (0..$max) {

my $a = 0;

foreach my $h (0..$#{$d[$n]}) {

$a += $d[$n][$h];

my $maxh = ($h % 2) ? ($h+2) : ($h+1);

foreach my $newh (1..$maxh) {

$d[$n+$newh][$newh] += $d[$n][$h];

}

}

print "$a, ";

}

CROSSREFS

KEYWORD

nonn

AUTHOR

Paul Tek, Apr 16 2013

STATUS

approved