OFFSET
0,2
COMMENTS
A polyiamond is a shape made up of n congruent equilateral triangles.
REFERENCES
Frank Harary and Heiko Harborth, Extremal animals, J. Combinatorics Information Syst. Sci., 1(1):1-8, 1976.
LINKS
Stefano Spezia, Table of n, a(n) for n = 0..10000
Greg Malen, Érika Roldán, and Rosemberg Toalá-Enríquez, Extremal {p, q}-Animals, Ann. Comb. (2023). See Corollary 1.9 at p. 8.
Greg Malen and Érika Roldán, Polyiamonds Attaining Extremal Topological Properties, arXiv:1906.08447 [math.CO], 2019.
J. Yackel, R. R. Meyer, and I. Christou, Minimum-perimeter domain assignment, Mathematical Programming, vol. 78 (1997), pp. 283-303.
W. C. Yang and R. R. Meyer, Maximal and minimal polyiamonds, 2002.
FORMULA
Let c(n) = ceiling(sqrt(6n)). Then a(n) is whichever of c(n) or c(n) + 1 has the same parity as n.
a(n) = 2*ceiling((n + sqrt(6*n))/2) - n (Harary and Harborth, 1976). - Stefano Spezia, Oct 02 2019
MAPLE
interface(quiet=true); for n from 0 to 100 do if (1 = 1) then temp1 := ceil(sqrt(6*n)); end if; if ((temp1 mod 2) = (n mod 2)) then temp2 := 0; else temp2 := 1; end if; printf("%d, ", temp1 + temp2); od;
PROG
(PARI) a(n)=2*ceil((n+sqrt(6*n))/2)-n; \\ Stefano Spezia, Oct 02 2019
(Python)
from math import isqrt
def A067628(n): return (c:=isqrt(6*n-1)+1)+((c^n)&1) if n else 0 # Chai Wah Wu, Jul 28 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Winston C. Yang (winston(AT)cs.wisc.edu), Feb 02 2002
STATUS
approved