%I #29 Dec 30 2023 23:44:53
%S 0,1,2,3,5,6,7,8,9,10,12,13,14,15,16,17,19,20,21,22,23,24,26,27,28,29,
%T 30,31,33,34,35,36,37,38,40,41,42,43,44,45,47,48,49,50,51,52,54,55,56,
%U 57,58,59,61,62,63,64,65,66,68,69,70,71,72,73,75,76,77,78,79,80,82,83
%N Numbers that are congruent to {0, 1, 2, 3, 5, 6} mod 7.
%C n(n+1)(n+2)...(n+6) / (n + (n+1) + (n+2) + ... + (n+6)) is an integer.
%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,0,0,1,-1).
%F Natural numbers minus '4, 11, 18, 25, ...' (= previous term + 7).
%F G.f.: x^2*(1+x+x^2+2*x^3+x^4+x^5) / ( (1+x)*(1+x+x^2)*(x^2-x+1)*(x-1)^2 ). - _R. J. Mathar_, Oct 08 2011
%F From _Wesley Ivan Hurt_, Jun 15 2016: (Start)
%F a(n) = a(n-1) + a(n-6) - a(n-7) for n > 7.
%F a(n) = (42*n - 45 - 3*cos(n*Pi) + 12*cos(n*Pi/3) - 4*sqrt(3)*sin(2*n*Pi/3))/36.
%F a(6k) = 7k-1, a(6k-1) = 7k-2, a(6k-2) = 7k-4, a(6k-3) = 7k-5, a(6k-4) = 7k-6, a(6k-5) = 7k-7. (End)
%p A032775:=n->(42*n-45-3*cos(n*Pi)+12*cos(n*Pi/3)-4*sqrt(3)*sin(2*n*Pi/3))/36: seq(A032775(n), n=1..100); # _Wesley Ivan Hurt_, Jun 15 2016
%t Select[Range[0, 100], MemberQ[{0, 1, 2, 3, 5, 6}, Mod[#, 7]] &] (* _Wesley Ivan Hurt_, Jun 15 2016 *)
%t DeleteCases[Range[0,100],_?(Mod[#,7]==4&)] (* or *) LinearRecurrence[ {1,0,0,0,0,1,-1},{0,1,2,3,5,6,7},80] (* _Harvey P. Dale_, Sep 19 2020 *)
%o (Magma) [ n: n in [0..90] | n mod 7 in {0, 1, 2, 3, 5, 6} ]; // _Vincenzo Librandi_, Dec 29 2010
%Y Cf. A032774, A032776.
%K nonn,easy
%O 1,3
%A _Patrick De Geest_, May 15 1998