OFFSET
0,7
LINKS
Robert Israel, Table of n, a(n) for n = 0..10000
J. J. P. Veerman, Hausdorff Dimension of Boundaries of Self-Affine Tiles in R^n, arXiv:math/9701215 [math.DS], 1997; Bol. Soc. Mex. Mat. 3, Vol. 4, No 2, 1998, 159-182.
FORMULA
Conjecture: a(n) = (2*n+1 + (2*n-8)*cos((2*n+1)*Pi/3) + sqrt(3)*cos((8*n+1)*Pi/6) + sqrt(3)*sin((2*n+1)*Pi/3))/9. - Wesley Ivan Hurt, Sep 25 2017
Conjectures from Colin Barker, Sep 27 2017: (Start)
G.f.: x*(1 + x^2 - x^3 + x^4) / ((1 - x)^2*(1 + x + x^2)^2).
a(n) = 2*a(n-3) - a(n-6) for n>5.
(End)
a(3*k+1) = 1, a(3*k)=a(3*k+2)=k. The conjectures easily follow from that. - Robert Israel, Jan 11 2018
a(n) = binomial(floor(n/3), a(n-1)). - Jon Maiga, Nov 24 2018
MAPLE
seq(op([k, 1, k]), k=0..50); # Robert Israel, Jan 11 2018
MATHEMATICA
v[0] = {1, 1, 1} M = {{1, 1, 0}, {0, 1, 0}, {0, 1, 1}} Det[M - x*IdentityMatrix[4] NSolve[Det[M - x*IdentityMatrix[4]] == 0, x] v[n_] := v[n] = M.v[n - 1] a = Flatten[Table[v[n], {n, 0, Floor[200/3]}]]
Flatten[Table[{n, 1, n}, {n, 0, 30}]] (* Harvey P. Dale, Jul 25 2011 *)
With[{nn=30}, Riffle[Riffle[Range[0, nn], Range[0, nn]], 1, {2, -1, 3}]] (* Harvey P. Dale, Aug 24 2016 *)
RecurrenceTable[{a[0] == 0, a[n] == Binomial[Floor[n/3], a[n - 1]]}, a, {n, 50}] (* Jon Maiga, Nov 24 2018 *)
PROG
(PARI) x='x+O('x^90); Vec(x*(1+x^2-x^3+x^4)/((1-x)^2*(1+x+x^2)^2)) \\ G. C. Greubel, Nov 25 2018
(Magma) m:=90; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( x*(1+x^2-x^3+x^4)/((1-x)^2*(1+x+x^2)^2) )); // G. C. Greubel, Nov 25 2018
(Sage) s=(x*(1+x^2-x^3+x^4)/((1-x)^2*(1+x+x^2)^2)).series(x, 90); s.coefficients(x, sparse=False) # G. C. Greubel, Nov 25 2018
(GAP) a:=[0, 1, 0, 1, 1, 1];; for n in [7..90] do a[n]:=2*a[n-3]-a[n-6]; od; Concatenation([0], a); # G. C. Greubel, Nov 25 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Mar 25 2005
STATUS
approved