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.

A096004 Number of convex triangular polyominoes containing n cells.

This page as a plain text file.
%I A096004 #44 Aug 27 2025 23:40:24
%S A096004 1,1,1,2,1,2,2,3,2,2,2,3,2,3,3,5,2,3,3,4,2,4,4,6,3,3,4,5,2,5,5,7,3,4,
%T A096004 5,6,3,5,5,8,3,4,5,6,4,7,7,9,4,5,5,7,3,7,8,9,3,5,7,8,4,8,8,11,4,5,7,8,
%U A096004 4,9,9,11,5,5,8,9,4,9,9,13,5,7,9,8,5,8,9,12
%N A096004 Number of convex triangular polyominoes containing n cells.
%C A096004 The main sequence on triangular polyominoes is A000577. The convexity condition makes enumeration easy as a convex triangular polyomino has at most 6 sides. It is simple to prove that a(n) is also the number of 4-tuples (p,b,c,d) of nonnegative integers satisfying b<=c<=d, b+c+d<=p, n=p^2-b^2-c^2-d^2.
%C A096004 For n = A014529(k) there are a(n) many polygons. At least one of them can be tiled with k equilateral triangles. - _Rainer Rosenthal_, Sep 20 2017
%H A096004 Rainer Rosenthal, <a href="/A096004/b096004.txt">Table of n, a(n) for n = 1..5200</a>
%H A096004 Peter Kagey, <a href="/A096004/a096004.txt">Examples for a(1)-a(30)</a>.
%H A096004 Walter Trump, <a href="/A096004/a096004.pdf">Number of Convex Polygons of a Given Perimeter or Area on the Triangular Lattice</a>, 2025.
%F A096004 a(n) >= sqrt(n)/3. - _Baohua Tian_, Apr 21 2020
%e A096004 a(8)=3 because there are 3 ways to compose a convex polygon of 8 equilateral triangles with side 1:
%e A096004 .
%e A096004     *---*---*---*---*
%e A096004    / \ / \ / \ / \ /
%e A096004   *---*---*---*---*
%e A096004       *---*---*
%e A096004      / \ / \ /
%e A096004     *---*---*
%e A096004    / \ / \ /
%e A096004   *---*---*
%e A096004       *---*
%e A096004      / \ / \
%e A096004     *---*---*
%e A096004    / \ / \ / \
%e A096004   *---*---*---*
%p A096004 a:=proc(n) local x,p,d,c,b; x:=0; for p from 0 to ceil((n+1)/2) do; for d from 0 to p do; for c from 0 to min(d,p-d) do; for b from 0 to min(c,p-c-d) do; if p^2-b^2-c^2-d^2=n then x:=x+1 fi; od; od; od; od; x; end; # corrected by _Rainer Rosenthal_, Sep 20 2017
%Y A096004 Cf. A000577, A014529.
%K A096004 easy,nonn,changed
%O A096004 1,4
%A A096004 _Paul Boddington_, Jul 27 2004
%E A096004 a(83) and a(84) corrected by _Rainer Rosenthal_, Sep 20 2017