OFFSET
0,1
COMMENTS
The round (nearest) function uses the convention that values halfway between two integers are rounded up, so a(4) = 37 = round(36 + 1/2).
LINKS
Wikipedia, T-square (fractal)
Kival Ngaokrajang, Illustration for n = 0..4
FORMULA
a(0) = 4; for n >= 1, a(n) = round(A083313(n)/2^(n-3)).
EXAMPLE
The central unit square has perimeter 4. At n=1, the additional 4 squares hide 4*1/2 = 2 units of length and add 4*3*1/2 = 6 units, to give a(1) = 4 - 2 + 6 = 8.
At n=2, the additional 12 squares hide 12*1/(2*2) units of length and add 12*3*1/(2*2) to give a(2) = 8 - 12/4 + 36/4 = 14.
MAPLE
A227621 := proc(n)
if n = 0 then 4
else
round(A083313(n)/2^(n-3)) ;
end if;
end proc: # R. J. Mathar, Aug 01 2013
PROG
(Small Basic)
a[0]=4
For n = 0 To 51
a[n+1] = Math.Round((Math.Power(3, n+1) - Math.Power(2, n))/Math.Power(2, n-2))
TextWindow.Write(a[n]+", ")
EndFor
CROSSREFS
KEYWORD
nonn
AUTHOR
Kival Ngaokrajang, Jul 17 2013
STATUS
approved