%I #26 Sep 08 2022 08:44:57
%S 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,
%T 44,45,46,49,51,52,53,56,58,59,60,63,65,66,67,70,72,73,74,77,79,80,81,
%U 84,86,87,88,91,93,94,95,98,100,101,102,105,107,108,109,112
%N Numbers that are congruent to {0, 2, 3, 4} mod 7.
%H Vincenzo Librandi, <a href="/A047340/b047340.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,1,-1).
%F 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
%F From _Wesley Ivan Hurt_, May 21 2016: (Start)
%F a(n) = a(n-1)+a(n-4)-a(n-5) for n>5.
%F a(n) = (14n-17-i^(2n)-(3-i)*i^(-n)-(3+i)*i^n)/8 where i=sqrt(-1).
%F a(2n) = A047348(n), a(2n-1) = A047355(n). (End)
%p 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
%t 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 *)
%t 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 *)
%o (Magma) [n : n in [0..150] | n mod 7 in [0,2,3,4]]; // _Vincenzo Librandi_, Feb 17 2014
%Y Cf. A047348, A047355.
%K nonn,easy
%O 1,2
%A _N. J. A. Sloane_
%E More terms from _Vincenzo Librandi_, Feb 17 2014