login
Period 2: repeat (6,9).
2

%I #32 Dec 14 2023 06:06:10

%S 6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,

%T 6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,6,9,

%U 6,9,6,9,6,9,6,9,6,9,6,9,6

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

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

%F a(n) = -(3/2)*(-1)^n + 15/2. - _Paolo P. Lava_, Oct 27 2006

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

%F a(n) = 6 + 2^(1-(-1)^n) - 1. - _Vincenzo Librandi_, Feb 27 2020

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

%o (PARI) a(n)=6+n%2*3 \\ _Charles R Greathouse IV_, Dec 21 2011

%o (Magma) &cat [[6, 9]^^50]; // _Vincenzo Librandi_, Feb 27 2020

%Y Cf. A176402.

%K nonn,easy

%O 0,1

%A _N. J. A. Sloane_