# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a254006 Showing 1-1 of 1 %I A254006 #34 Nov 30 2015 18:00:30 %S A254006 1,0,3,0,9,0,27,0,81,0,243,0,729,0,2187,0,6561,0,19683,0,59049,0, %T A254006 177147,0,531441,0,1594323,0,4782969,0,14348907,0,43046721,0, %U A254006 129140163,0,387420489,0,1162261467,0,3486784401,0,10460353203,0,31381059609,0,94143178827 %N A254006 a(0) = 1, a(n) = 3*a(n-2) if n mod 2 = 0, otherwise a(n) = 0. %C A254006 Inspired by the Lévy C-curve, and generated using different construction rules as shown in the links. %C A254006 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. %C A254006 Powers of 3 interspersed with zeros. - _Colin Barker_, Jan 26 2015 %H A254006 Colin Barker, Table of n, a(n) for n = 0..1000 %H A254006 Kival Ngaokrajang, Illustration of construction rule and initial terms %H A254006 Index entries for linear recurrences with constant coefficients, signature (0,3). %F A254006 a(n) = 3*a(n-2) if n mod 2 = 0, otherwise a(n) = 0, a(0) = 1. %F A254006 a(n) = (3^(n/2)*(1+(-1)^n))/2. - _Colin Barker_, Jan 26 2015 %F A254006 G.f.: -1 / (3*x^2-1). - _Colin Barker_, Jan 26 2015 %t A254006 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 *) %o A254006 (PARI) %o A254006 { %o A254006 a=1; print1(a,", "); %o A254006 for (n=1,100, %o A254006 if (Mod(n,2)==0, %o A254006 a=a*3; %o A254006 print1(a,", "), %o A254006 print1(0,", ") %o A254006 ) %o A254006 ) %o A254006 } %o A254006 (PARI) %o A254006 Vec(-1/(3*x^2-1) + O(x^100)) \\ _Colin Barker_, Jan 26 2015 %Y A254006 Cf. A251732, A251733. %K A254006 nonn,easy %O A254006 0,3 %A A254006 _Kival Ngaokrajang_, Jan 26 2015 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE