login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Period 4: repeat [0, 2, 4, 6].
0

%I #32 Mar 02 2024 01:26:48

%S 0,2,4,6,0,2,4,6,0,2,4,6,0,2,4,6,0,2,4,6,0,2,4,6,0,2,4,6,0,2,4,6,0,2,

%T 4,6,0,2,4,6,0,2,4,6,0,2,4,6,0,2,4,6,0,2,4,6,0,2,4,6,0,2,4,6,0,2,4,6,

%U 0,2,4,6,0,2,4,6,0,2,4,6,0,2,4,6,0,2,4,6,0,2,4,6,0,2,4,6,0,2,4,6,0,2,4,6,0,2,4,6

%N Period 4: repeat [0, 2, 4, 6].

%H Salvatore Gambino, <a href="http://digilander.libero.it/salgam">Terne pitagoriche primitive</a>

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

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

%F G.f.: 2*x^2*(1+2*x+3*x^2)/((1-x)*(1+x)*(1+x^2)). a(n) = 2*A010873(n-1). - _R. J. Mathar_, Jan 15 2008

%F From _Wesley Ivan Hurt_, Jul 09 2016: (Start)

%F a(n) = a(n-4) for n>4.

%F a(n) = 3 + cos(n*Pi) + 2*cos(n*Pi/2) - 2*sin(n*Pi/2) + I*sin(n*Pi). (End)

%p seq(op([0, 2, 4, 6]), n=1..40); # _Wesley Ivan Hurt_, Jul 09 2016

%t PadRight[{}, 100, {0, 2, 4, 6}] (* _Wesley Ivan Hurt_, Jul 09 2016 *)

%o (Magma) &cat [[0, 2, 4, 6]^^30]; // _Wesley Ivan Hurt_, Jul 09 2016

%Y Cf. A010873.

%K nonn,easy

%O 1,2

%A Salvatore Gambino (salvatore.gambino(AT)fastwebnet.it), Oct 04 2007

%E More terms from _R. J. Mathar_, Jan 15 2008