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

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

%S 0,2,5,6,8,11,12,14,17,18,20,23,24,26,29,30,32,35,36,38,41,42,44,47,

%T 48,50,53,54,56,59,60,62,65,66,68,71,72,74,77,78,80,83,84,86,89,90,92,

%U 95,96,98,101,102,104,107,108,110,113,114,116,119,120,122,125

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

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

%F a(n) = 3*n-3*floor(n/3)-(n^2 mod 3), with offset 0. - _Gary Detlefs_, Mar 19 2010

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

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

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

%F a(n) = (6*n-5+2*cos(2*n*Pi/3))/3.

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

%F E.g.f.: (3 + (6*x - 5)*exp(x) + 2*cos(sqrt(3)*x/2)*(cosh(x/2) - sinh(x/2)))/3. - _Ilya Gutkovskiy_, Jun 14 2016

%F Sum_{n>=2} (-1)^n/a(n) = log(2)/3 + log(2+sqrt(3))/(2*sqrt(3)) - (3-sqrt(3))*Pi/18. - _Amiram Eldar_, Dec 14 2021

%p seq(3*n-3*floor(n/3)-(n^2 mod 3), n=0..54); # _Gary Detlefs_, Mar 19 2010

%t Select[Range[0,110], MemberQ[{0,2,5}, Mod[#,6]]&] (* or *) LinearRecurrence[{1,0,1,-1}, {0,2,5,6}, 60] (* _Harvey P. Dale_, Aug 31 2015 *)

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

%Y Cf. A011655. [_Gary Detlefs_, Mar 19 2010]

%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 23 11:07 EDT 2024. Contains 371905 sequences. (Running on oeis4.)