A226294 Period 2: repeat [6, 4].
6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6, 4, 6
Offset: 0
Examples
s(1) = 7, s(2) = 11, s(3) = 17, s(4) = 21, s(5) = 27, s(6) = 31; s(-1) = -3, s(-2) = -9, s(-3) = -13, s(-4) = -19, s(-5) = -23, s(-6) = -29;
Links
- Index entries for linear recurrences with constant coefficients, signature (0,1).
Programs
-
Magma
&cat [[6, 4]^^50]; // Wesley Ivan Hurt, Jul 18 2016
-
Maple
A226294:=n->5+(-1)^n: seq(A226294(n), n=0..100); # Wesley Ivan Hurt, Mar 24 2014
-
Mathematica
Table[5+(-1)^n, {n,0,100}] (* Wesley Ivan Hurt, Mar 24 2014 *)
-
PARI
a(n)=6-n%2*2 \\ Charles R Greathouse IV, Jul 17 2016
Formula
a(n) = 5+(-1)^n = 2*A176059(n).
To generate the summation sequence s(n), start with s(0) = 1, and a(0) = 6.
For positive values of s(n): s(n+1) = s(n) + a(n)
For negative values of s(n): s(n-1) = s(n) - a(n-1). n is negative here.
See example values for s(n) below, for both positive and negative indices.
G.f.: ( 6+4*x ) / ( (1-x)*(1+x) ). - R. J. Mathar, Jun 12 2013
a(n) = a(n-2) for n>1. - Wesley Ivan Hurt, Jul 18 2016
Comments