OFFSET
0,3
COMMENTS
Inspired by the Lévy C-curve, and generated using different construction rules as shown in the links.
The length of this variant Lévy C-curve is an integer in the real quadratic number field Q(sqrt(3)), namely L(n) = A(n) + B(n)*sqrt(3) with A(n) = a(n) and B(n) = a(n-1), with a(0) = 1. See the construction rule and the illustration in the links.
Powers of 3 interspersed with zeros. - Colin Barker, Jan 26 2015
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Kival Ngaokrajang, Illustration of construction rule and initial terms
Index entries for linear recurrences with constant coefficients, signature (0,3).
FORMULA
a(n) = 3*a(n-2) if n mod 2 = 0, otherwise a(n) = 0, a(0) = 1.
a(n) = (3^(n/2)*(1+(-1)^n))/2. - Colin Barker, Jan 26 2015
G.f.: -1 / (3*x^2-1). - Colin Barker, Jan 26 2015
MATHEMATICA
nxt[{n_, a_, b_}]:={n+1, b, If[OddQ[n], 3a, 0]}; Transpose[NestList[nxt, {1, 1, 0}, 50]][[2]] (* or *) With[{nn=25}, Riffle[3^Range[0, nn], 0]] (* Harvey P. Dale, Nov 30 2015 *)
PROG
(PARI)
{
a=1; print1(a, ", ");
for (n=1, 100,
if (Mod(n, 2)==0,
a=a*3;
print1(a, ", "),
print1(0, ", ")
)
)
}
(PARI)
Vec(-1/(3*x^2-1) + O(x^100)) \\ Colin Barker, Jan 26 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Kival Ngaokrajang, Jan 26 2015
STATUS
approved