login
4*n-2 and 6*n alternatively.
1

%I #30 Sep 02 2024 04:30:38

%S 2,6,6,12,10,18,14,24,18,30,22,36,26,42,30,48,34,54,38,60,42,66,46,72,

%T 50,78,54,84,58,90,62,96,66,102,70,108,74,114,78,120,82,126,86,132,90,

%U 138,94,144,98,150

%N 4*n-2 and 6*n alternatively.

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,-1).

%F a(n) = n*(3 - (n mod 2)).

%F From _Bruno Berselli_, Sep 26 2011: (Start)

%F G.f.: 2*x*(1+3*x+x^2)/(1-x^2)^2.

%F a(n) = (1/2)*((-1)^n+5)*n.

%F a(n) = -a(-n) = A195013(n) - A195013(-n). (End)

%F a(n) = 2*a(n-2) - a(n-4); a(1)=2, a(2)=6, a(3)=6, a(4)=12. - _Harvey P. Dale_, Aug 14 2013

%p a:=n->add(2+add((-1)^j, j=2..n),j=1..n):seq(a(n),n=1..69); # _Zerinvary Lajos_, Dec 13 2008

%t Flatten[Table[{4n-2,6n},{n,30}]] (* or *) LinearRecurrence[{0,2,0,-1},{2,6,6,12},60] (* _Harvey P. Dale_, Aug 14 2013 *)

%o (Magma) &cat[[4*n-2,6*n]: n in [1..25]]; // _Bruno Berselli_, Sep 26 2011

%K nonn,easy

%O 1,1

%A _Zak Seidov_, May 19 2005

%E Definition corrected by _Bruno Berselli_, Sep 26 2011