login
Period 2: repeat (0,6).
3

%I #19 Aug 10 2023 14:06:23

%S 0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,

%T 0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,0,6,

%U 0,6,0,6,0,6,0,6,0,6,0,6,0

%N Period 2: repeat (0,6).

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

%F a(n) = 3*[1-(-1)^n] = 6*(n mod 2). - _Paolo P. Lava_, Oct 20 2006

%F G.f. 6x/((1-x)(1+x)). - _R. J. Mathar_, Nov 21 2011

%t Table[6 Mod[n, 2], {n, 0, 50}] (* _Jinyuan Wang_, Feb 26 2020 *)

%t PadRight[{},100,{0,6}] (* _Harvey P. Dale_, Aug 10 2023 *)

%o (PARI) a(n)=n%2*6 \\ _Charles R Greathouse IV_, Jul 13 2016

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_