A047381 Numbers that are congruent to {0, 1, 2, 4, 5} mod 7.
0, 1, 2, 4, 5, 7, 8, 9, 11, 12, 14, 15, 16, 18, 19, 21, 22, 23, 25, 26, 28, 29, 30, 32, 33, 35, 36, 37, 39, 40, 42, 43, 44, 46, 47, 49, 50, 51, 53, 54, 56, 57, 58, 60, 61, 63, 64, 65, 67, 68, 70, 71, 72, 74, 75, 77, 78
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,1,-1)
Programs
-
Magma
[ n: n in [1..80] | n mod 7 in [0,1,2,4,5] ]; // Vincenzo Librandi, Jul 26 2013
-
Maple
seq(floor((7/5)*(n-1)),n=1..56); # Gary Detlefs, Feb 20 2010
-
Mathematica
CoefficientList[Series[x (1 + x + 2 x^2 + x^3 + 2 x^4) / ((x^4 + x^3 + x^2 + x + 1) (x - 1)^2), {x, 0, 60}], x] (* Vincenzo Librandi, Jul 26 2013 *) LinearRecurrence[{1,0,0,0,1,-1},{0,1,2,4,5,7},80] (* Harvey P. Dale, Oct 04 2023 *)
Formula
a(n) = floor( (7/5)(n-1) ). [Gary Detlefs, Feb 20 2010]
From R. J. Mathar, Mar 11 2011: (Start)
a(n) = a(n-1) + a(n-5) - a(n-6).
G.f.: x^2*(1 + x + 2*x^2 + x^3 + 2*x^4) / ((x^4 + x^3 + x^2 + x + 1)*(x-1)^2). (End)
5*a(n) = 7*n-9-b(n) where b(n) = b(n-5) = 1, -2, 0, 2, -1 (for offset 0). - R. J. Mathar, Jul 22 2020
Extensions
Formula and Maple code adapted to the offset by Wesley Ivan Hurt, Jul 16 2013