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”).

A047509
Numbers that are congruent to {0, 1, 4, 6, 7} mod 8.
1
0, 1, 4, 6, 7, 8, 9, 12, 14, 15, 16, 17, 20, 22, 23, 24, 25, 28, 30, 31, 32, 33, 36, 38, 39, 40, 41, 44, 46, 47, 48, 49, 52, 54, 55, 56, 57, 60, 62, 63, 64, 65, 68, 70, 71, 72, 73, 76, 78, 79, 80, 81, 84, 86, 87, 88, 89, 92, 94, 95, 96, 97, 100, 102, 103, 104
OFFSET
1,3
FORMULA
From Chai Wah Wu, May 30 2016: (Start)
a(n) = a(n-1) + a(n-5) - a(n-6), for n > 6.
G.f.: x^2*(x^4 + x^3 + 2*x^2 + 3*x + 1)/(x^6 - x^5 - x + 1). (End)
MATHEMATICA
LinearRecurrence[{1, 0, 0, 0, 1, -1}, {0, 1, 4, 6, 7, 8}, 50] (* G. C. Greubel, May 30 2016 *)
Join[{0}, Select[Range[200], MemberQ[{0, 1, 4, 6, 7}, Mod[#, 8]] &]] (* Vincenzo Librandi, May 30 2016 *)
PROG
(Magma) [n: n in [0..200] | n mod 8 in [0, 1, 4, 6, 7]]; // Vincenzo Librandi, May 30 2016
CROSSREFS
Sequence in context: A299411 A079000 A357122 * A181057 A151757 A171413
KEYWORD
nonn,easy
STATUS
approved