A047348 Numbers that are congruent to {2, 4} mod 7.
2, 4, 9, 11, 16, 18, 23, 25, 30, 32, 37, 39, 44, 46, 51, 53, 58, 60, 65, 67, 72, 74, 79, 81, 86, 88, 93, 95, 100, 102, 107, 109, 114, 116, 121, 123, 128, 130, 135, 137, 142, 144, 149, 151, 156, 158, 163, 165, 170
Offset: 1
Links
- David Lovler, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (1,1,-1).
Programs
-
Maple
seq(7*floor((n-1)/2)+3 +(-1)^n,n=1..49); # Gary Detlefs, Mar 02 2010
-
Mathematica
LinearRecurrence[{1,1,-1},{2,4,9},50] (* Harvey P. Dale, Aug 04 2016 *)
-
PARI
a(n) = (14*n - 9 - 3*(-1)^n)/4 \\ David Lovler, Sep 18 2022
Formula
From R. J. Mathar, Dec 16 2009: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3).
G.f.: x*(2+2*x+3*x^2)/((1+x)*(x-1)^2). (End)
a(n) = 7*floor((n-1)/2) + 3 + (-1)^n. - Gary Detlefs, Mar 02 2010
a(n) = 7*n - a(n-1) - 8 with n > 1, a(1)=2. - Vincenzo Librandi, Aug 05 2010
E.g.f.: 3 + ((14*x - 9)*exp(x) - 3*exp(-x))/4. - David Lovler, Sep 12 2022
Comments