A075886 Number of cubes at generation n when building fractal cube with edge ratio of 1/2.
1, 6, 30, 150, 726, 3510, 16854, 80886, 387606, 1857078, 8894550, 42598518, 204000918, 976929462, 4678286550, 22403128566, 107282481942, 513746046774, 2460185076054, 11781130000758, 56416485185430, 270162504104886
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (5,4,-24).
Programs
-
Mathematica
Rest[CoefficientList[Series[x (-4x^2+x+1)/(24x^3-4x^2-5x+1),{x,0,30}],x]] (* or *) LinearRecurrence[{5,4,-24},{1,6,30},30] (* Harvey P. Dale, Mar 17 2012 *)
-
UBASIC
50 word *: point 80 100 cls: print: print "Fractal Cube Ratio = 1/2": print 110 locate 3: print "1";: locate 9: print "1" 120 locate 3: print "2";: locate 9: print "6" 130 A=6: B=0: C=0: D=0: E=0: G=2: Cc=2: V=1.75: Dv=1/8 140 G=G+1: Cc=Cc+1: Dv=Dv/8 150 Na=A+B+D: Nb=4*A+3*B+2*D 160 Nc=B+2*D: Nd=3*C+2*E: Ne=C+2*E 170 Ncubes = Na+Nb+Nc+Nd+Ne 180 A=Na: B=Nb: C=Nc: D=Nd: E=Ne: V=V+Ncubes*Dv 190 Locate 2: print G;: locate 8: print Ncubes 200 if Cc<40 then 140 210 print: locate 4: print "V = ";: print using(2,60),V: print 220 print: print " Push 'S' to stop or space bar to continue": print 230 A$=inkey: if A$="" then 230 240 if A$="s" or A$="S" then print: end 250 Cc=0: goto 140
Formula
G.f.: x(-4*x^2 + x + 1)/(24*x^3 - 4*x^2 - 5*x + 1). - Ralf Stephan, May 09 2004
a(n) = 5*a(n-1) + 4*a(n-2) - 24*a(n-3). - Harvey P. Dale, Mar 17 2012
Comments