login
A047340
Numbers that are congruent to {0, 2, 3, 4} mod 7.
1
0, 2, 3, 4, 7, 9, 10, 11, 14, 16, 17, 18, 21, 23, 24, 25, 28, 30, 31, 32, 35, 37, 38, 39, 42, 44, 45, 46, 49, 51, 52, 53, 56, 58, 59, 60, 63, 65, 66, 67, 70, 72, 73, 74, 77, 79, 80, 81, 84, 86, 87, 88, 91, 93, 94, 95, 98, 100, 101, 102, 105, 107, 108, 109, 112
OFFSET
1,2
FORMULA
G.f.: x^2*(2+x+x^2+3*x^3) / ( (1+x)*(1+x^2)*(x-1)^2 ). - R. J. Mathar, Dec 04 2011
From Wesley Ivan Hurt, May 21 2016: (Start)
a(n) = a(n-1)+a(n-4)-a(n-5) for n>5.
a(n) = (14n-17-i^(2n)-(3-i)*i^(-n)-(3+i)*i^n)/8 where i=sqrt(-1).
a(2n) = A047348(n), a(2n-1) = A047355(n). (End)
MAPLE
A047340:=n->(14*n-17-I^(2*n)-(3-I)*I^(-n)-(3+I)*I^n)/8: seq(A047340(n), n=1..100); # Wesley Ivan Hurt, May 21 2016
MATHEMATICA
Select[Range[0, 100], MemberQ[{0, 2, 3, 4}, Mod[#, 7]]&] (* or *) LinearRecurrence[ {1, 0, 0, 1, -1}, {0, 2, 3, 4, 7}, 100] (* Harvey P. Dale, Feb 16 2014 *)
CoefficientList[Series[x (2 + x + x^2 + 3 x^3)/((1 + x) (1 + x^2) (x - 1)^2), {x, 0, 200}], x] (* Vincenzo Librandi, Feb 17 2014 *)
PROG
(Magma) [n : n in [0..150] | n mod 7 in [0, 2, 3, 4]]; // Vincenzo Librandi, Feb 17 2014
CROSSREFS
Sequence in context: A141489 A060253 A066276 * A270711 A096118 A050029
KEYWORD
nonn,easy
EXTENSIONS
More terms from Vincenzo Librandi, Feb 17 2014
STATUS
approved