A105397 Periodic with period 2: repeat [4,2].
4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2, 4, 2
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (0,1).
Crossrefs
Cf. A010694 (period 2, repeat [2,4]).
First differences of A007310. - Fred Daniel Kline, Aug 17 2020
Programs
-
Maple
A105397:=n->3 + (-1)^n; seq(A105397(n), n=0..100); # Wesley Ivan Hurt, Mar 14 2014
-
Mathematica
Table[3 + (-1)^n, {n, 0, 100}] (* Wesley Ivan Hurt, Mar 14 2014 *) LinearRecurrence[{0, 1},{4, 2},75] (* Ray Chandler, Aug 25 2015 *)
-
PARI
contfrac(2+sqrt(6)) \\ Michel Marcus, Mar 18 2014
Formula
a(n) = 3 + (-1)^n = 4 - 2*(n mod 2) = 2 * 2^((n+1) mod 2). - Wesley Ivan Hurt, Mar 14 2014
Extensions
Edited by N. J. A. Sloane, Jun 08 2010
Comments