login
Period 2: repeat (3,8).
5

%I #39 Dec 14 2023 06:04:04

%S 3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,

%T 3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,3,8,

%U 3,8,3,8,3,8,3,8,3,8,3,8,3

%N Period 2: repeat (3,8).

%C Continued fraction of (6+sqrt 42)/4. - _R. J. Mathar_, Nov 21 2011

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

%F a(n) = -(5/2)*(-1)^n + 11/2. - _Paolo P. Lava_, Oct 20 2006

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

%F a(n) = 3 + 5*(n mod 2). - _Wesley Ivan Hurt_, Jun 16 2014

%p A010706:=n->3 + 5*(n mod 2); seq(A010706(n), n=0..50); # _Wesley Ivan Hurt_, Jun 16 2014

%t Table[3 + 5 Mod[n, 2], {n, 0, 50}] (* _Wesley Ivan Hurt_, Jun 16 2014 *)

%o (PARI) a(n)=3+[0,5][1+n%2]; /* Same as 3+5*(n%2) */ \\ _R. J. Cano_, Jun 16 2014

%o (Magma) [3 + 5*(n mod 2): n in [0..50]]; // _Wesley Ivan Hurt_, Jun 16 2014

%K nonn,easy

%O 0,1

%A _N. J. A. Sloane_, Dec 11 1996