login
A254006
a(0) = 1, a(n) = 3*a(n-2) if n mod 2 = 0, otherwise a(n) = 0.
9
1, 0, 3, 0, 9, 0, 27, 0, 81, 0, 243, 0, 729, 0, 2187, 0, 6561, 0, 19683, 0, 59049, 0, 177147, 0, 531441, 0, 1594323, 0, 4782969, 0, 14348907, 0, 43046721, 0, 129140163, 0, 387420489, 0, 1162261467, 0, 3486784401, 0, 10460353203, 0, 31381059609, 0, 94143178827
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
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
Sequence in context: A164597 A167295 A079442 * A321329 A016645 A217764
KEYWORD
nonn,easy
AUTHOR
Kival Ngaokrajang, Jan 26 2015
STATUS
approved