login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A047357 Numbers that are congruent to {0, 1, 3} mod 7. 1

%I #23 Sep 08 2022 08:44:57

%S 0,1,3,7,8,10,14,15,17,21,22,24,28,29,31,35,36,38,42,43,45,49,50,52,

%T 56,57,59,63,64,66,70,71,73,77,78,80,84,85,87,91,92,94,98,99,101,105,

%U 106,108,112,113,115,119,120,122,126,127,129,133,134,136,140

%N Numbers that are congruent to {0, 1, 3} mod 7.

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).

%F Partial sums of (0, 1, 2, 4, 1, 2, 4, 1, 2, 4, ...). - _Gary W. Adamson_, Jun 19 2008

%F G.f.: x^2*(1+2*x+4*x^2)/((1+x+x^2)*(x-1)^2). - _R. J. Mathar_, Dec 04 2011

%F From _Wesley Ivan Hurt_, Jun 08 2016: (Start)

%F a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.

%F a(n) = (21*n-30-6*cos(2*n*Pi/3)+4*sqrt(3)*sin(2*n*Pi/3))/9.

%F a(3k) = 7k-4, a(3k-1) = 7k-6, a(3k-2) = 7k-7. (End)

%p A047357:=n->(21*n-30-6*cos(2*n*Pi/3)+4*sqrt(3)*sin(2*n*Pi/3))/9: seq(A047357(n), n=1..100); # _Wesley Ivan Hurt_, Jun 08 2016

%t Select[Range[0, 200], Mod[#, 7] == 0 || Mod[#, 7] == 1 || Mod[#, 7] == 3 &] (* _Vladimir Joseph Stephan Orlovsky_, Jul 10 2011 *)

%t Select[Range[0,200], MemberQ[{0,1,3}, Mod[#,7]]&] (* _Harvey P. Dale_, Nov 30 2012 *)

%t Accumulate[PadRight[{0},70,{4,1,2}]] (* _Harvey P. Dale_, Aug 16 2021 *)

%o (Magma) [n : n in [0..150] | n mod 7 in [0, 1, 3]]; // _Wesley Ivan Hurt_, Jun 08 2016

%Y Cf. A047360.

%K nonn,easy

%O 1,3

%A _N. J. A. Sloane_

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)