OFFSET
1,1
COMMENTS
Complement of numbers congruent to {0, 1, 2, 7} mod 8. - Jaroslav Krizek, Dec 19 2009
In general, sequences congruent to {a, a + i, a + 2i, ..., a + pi} mod k and a + p*i < k have a general form of (k - i*p)*floor(n/p) + i*n + a, from offset 0. - Gary Detlefs, Oct 20 2013
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
G.f.: x*(3+x+x^2+x^3+2*x^4) / ( (1+x)*(x^2+1)*(x-1)^2 ). - R. J. Mathar, Oct 08 2011
a(n) = 8*floor((n-1)/4) + ((n-1) mod 4) + 3.
a(n) = OR(n-1, 1) + OR(n-1, 2). - Gary Detlefs, Oct 20 2013
From Wesley Ivan Hurt, May 31 2016: (Start)
a(n) = a(n-1) + a(n-4) - a(n-5) for n>5.
a(n) = (4*n-1-i^(2*n)-(1-i)*i^(-n)-(1+i)*i^n)/2 where i=sqrt(-1).
E.g.f.: 2 + sin(x) - cos(x) + 2*x*sinh(x) + (2*x - 1)*cosh(x). - Ilya Gutkovskiy, May 31 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/16 + (3-sqrt(2))*log(2)/8 + sqrt(2)*log(2-sqrt(2))/4. - Amiram Eldar, Dec 26 2021
MAPLE
A047425:=n->8*floor((n-1)/4)+((n-1) mod 4)+3: seq(A047425(n), n=1..100); # Wesley Ivan Hurt, May 31 2016
MATHEMATICA
Flatten[# + {3, 4, 5, 6} &/@(8*Range[0, 15])] (* Harvey P. Dale, Jun 26 2011 *)
PROG
(Magma) [n : n in [0..150] | n mod 8 in [3, 4, 5, 6]]; // Wesley Ivan Hurt, May 31 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved