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!)
A047388 Numbers that are congruent to {0, 1, 2, 5} mod 7. 3

%I #28 Jan 10 2023 12:48:53

%S 0,1,2,5,7,8,9,12,14,15,16,19,21,22,23,26,28,29,30,33,35,36,37,40,42,

%T 43,44,47,49,50,51,54,56,57,58,61,63,64,65,68,70,71,72,75,77,78,79,82,

%U 84,85,86,89,91,92,93,96,98,99,100,103,105,106,107,110,112

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

%H Vincenzo Librandi, <a href="/A047388/b047388.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*(1+x+3*x^2+2*x^3)/((1-x)^2*(1+x)*(1+x^2)). - _Colin Barker_, May 13 2012

%F a(n) = (-19+(-1)^n+(1+3*i)*(-i)^n+(1-3*i)*i^n+14*n)/8 where i=sqrt(-1). - _Colin Barker_, May 14 2012

%F a(n) = a(n-1) + a(n-4) - a(n-5) for n>5. - _Vincenzo Librandi_, May 16 2012

%F a(2k) = A047383(k), a(2k-1) = A047352(k). - _Wesley Ivan Hurt_, Jun 01 2016

%p A047388:=n->(-19+I^(2*n)+(1+3*I)*(-I)^n+(1-3*I)*I^n+14*n)/8: seq(A047388(n), n=1..100); # _Wesley Ivan Hurt_, Jun 01 2016

%t Select[Range[0,300], MemberQ[{0,1,2,5}, Mod[#,7]]&] (* _Vincenzo Librandi_, May 15 2012 *)

%t LinearRecurrence[{1,0,0,1,-1},{0,1,2,5,7},80] (* _Harvey P. Dale_, Jan 10 2023 *)

%o (Magma) I:=[0, 1, 2, 5, 7]; [n le 5 select I[n] else Self(n-1)+Self(n-4)-Self(n-5): n in [1..70]]; // _Vincenzo Librandi_, May 15 2012

%o (PARI) x='x+O('x^100); concat(0, Vec(x^2*(1+x+3*x^2+2*x^3)/((1-x)^2*(1+x)*(1+x^2)))) \\ _Altug Alkan_, Jun 02 2016

%Y Cf. A047352, A047383.

%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 May 3 09:50 EDT 2024. Contains 372207 sequences. (Running on oeis4.)