login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A047604
Numbers that are congruent to {2, 3, 5} mod 8.
1
2, 3, 5, 10, 11, 13, 18, 19, 21, 26, 27, 29, 34, 35, 37, 42, 43, 45, 50, 51, 53, 58, 59, 61, 66, 67, 69, 74, 75, 77, 82, 83, 85, 90, 91, 93, 98, 99, 101, 106, 107, 109, 114, 115, 117, 122, 123, 125, 130, 131, 133, 138, 139, 141, 146, 147, 149, 154, 155, 157
OFFSET
1,1
FORMULA
From Chai Wah Wu, May 29 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
G.f.: x*(x + 1)*(3*x^2 - x + 2)/((x - 1)^2*(x^2 + x + 1)). (End)
From Wesley Ivan Hurt, Jun 10 2016: (Start)
a(n) = 8*n/3-2-cos(2*n*Pi/3)+5*sin(2*n*Pi/3)/(3*sqrt(3)).
a(3k) = 8k-3, a(3k-1) = 8k-5, a(3k-2) = 8k-6. (End)
MAPLE
A047604:=n->8*n/3-2-cos(2*n*Pi/3)+5*sin(2*n*Pi/3)/(3*sqrt(3)): seq(A047604(n), n=1..100); # Wesley Ivan Hurt, Jun 10 2016
MATHEMATICA
Flatten[#+{2, 3, 5}&/@(8*Range[0, 20])] (* Harvey P. Dale, Oct 17 2013 *)
LinearRecurrence[{1, 0, 1, -1}, {2, 3, 5, 10}, 50] (* G. C. Greubel, May 29 2016 *)
PROG
(Magma) [n : n in [0..150] | n mod 8 in [2, 3, 5]]; // Wesley Ivan Hurt, May 29 2016
CROSSREFS
Sequence in context: A246392 A219860 A076681 * A104427 A259732 A192229
KEYWORD
nonn,easy
STATUS
approved