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!)
A047289 Numbers that are congruent to {0, 4, 6} mod 7. 1

%I #37 Sep 08 2022 08:44:56

%S 0,4,6,7,11,13,14,18,20,21,25,27,28,32,34,35,39,41,42,46,48,49,53,55,

%T 56,60,62,63,67,69,70,74,76,77,81,83,84,88,90,91,95,97,98,102,104,105,

%U 109,111,112,116,118,119,123,125,126,130,132,133,137,139,140

%N Numbers that are congruent to {0, 4, 6} mod 7.

%H Vincenzo Librandi, <a href="/A047289/b047289.txt">Table of n, a(n) for n = 1..5000</a>

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

%F From _Colin Barker_, Mar 13 2012: (Start)

%F G.f.: x*(4+2*x+x^2)/((1-x)^2*(1+x+x^2)).

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

%F a(n) = Sum_{i=1..n} 2^(-i mod 3). - _Wesley Ivan Hurt_, Jul 08 2014

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

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

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

%p A047289:=n->(21*n-12+3*cos(2*n*Pi/3)-5*sqrt(3)*sin(2*n*Pi/3))/9: seq(A047289(n), n=1..100); # _Wesley Ivan Hurt_, Jun 10 2016

%t Cases[Range[0, 123], n_ /; MatchQ[Mod[n, 7], 0 | 4 | 6]] (* _Jean-François Alcover_, Mar 16 2011 *)

%t Select[Range[0,125], MemberQ[{0,4,6}, Mod[#,7]]&] (* _Vincenzo Librandi_, Apr 26 2012 *)

%o (Magma) I:=[0, 4, 6, 7]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..70]]; // _Vincenzo Librandi_, Apr 26 2012

%Y Cf. A153727.

%K nonn,easy

%O 1,2

%A _N. J. A. Sloane_

%E More terms from _Wesley Ivan Hurt_, Jul 08 2014

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 25 11:24 EDT 2024. Contains 371967 sequences. (Running on oeis4.)