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

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

%S 0,3,6,7,10,13,14,17,20,21,24,27,28,31,34,35,38,41,42,45,48,49,52,55,

%T 56,59,62,63,66,69,70,73,76,77,80,83,84,87,90,91,94,97,98,101,104,105,

%U 108,111,112,115,118,119,122,125,126,129,132,133,136,139,140

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

%H Vincenzo Librandi, <a href="/A047281/b047281.txt">Table of n, a(n) for n = 1..1000</a>

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

%F a(n+1) = 3*n - 2*floor(n/3). - _Gary Detlefs_, Mar 27 2010

%F G.f.: x^2*(3+3*x+x^2) / ((1+x+x^2)*(x-1)^2). - _R. J. Mathar_, Oct 25 2011

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

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

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

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

%F a(n) = Sum_{i=1..n-1} numerator(3/i). - _Wesley Ivan Hurt_, Feb 26 2017

%p seq(3*n - 2*floor(n/3), n=0..52); # _Gary Detlefs_, Mar 27 2010

%t Select[Range[0,150], MemberQ[{0,3,6}, Mod[#,7]]&] (* _Harvey P. Dale_, Oct 05 2012 *)

%t LinearRecurrence[{1, 0, 1, -1}, {0, 3, 6, 7}, 70] (* _Vincenzo Librandi_, Feb 28 2017 *)

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

%o (PARI) a(n)=3*n - 3 - (n-1)\3*2 \\ _Charles R Greathouse IV_, Feb 28 2017

%K nonn,easy

%O 1,2

%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 24 05:19 EDT 2024. Contains 371918 sequences. (Running on oeis4.)