login
A047267
Numbers that are congruent to {0, 2, 5} mod 6.
3
0, 2, 5, 6, 8, 11, 12, 14, 17, 18, 20, 23, 24, 26, 29, 30, 32, 35, 36, 38, 41, 42, 44, 47, 48, 50, 53, 54, 56, 59, 60, 62, 65, 66, 68, 71, 72, 74, 77, 78, 80, 83, 84, 86, 89, 90, 92, 95, 96, 98, 101, 102, 104, 107, 108, 110, 113, 114, 116, 119, 120, 122, 125
OFFSET
1,2
FORMULA
a(n) = 3*n-3*floor(n/3)-(n^2 mod 3), with offset 0. - Gary Detlefs, Mar 19 2010
G.f.: x^2*(x+2)*(1+x) / ((1+x+x^2)*(x-1)^2). - R. J. Mathar, Oct 08 2011
From Wesley Ivan Hurt, Jun 13 2016: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4) for n>4.
a(n) = (6*n-5+2*cos(2*n*Pi/3))/3.
a(3k) = 6k-1, a(3k-1) = 6k-4, a(3k-2) = 6k-6. (End)
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
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
MAPLE
seq(3*n-3*floor(n/3)-(n^2 mod 3), n=0..54); # Gary Detlefs, Mar 19 2010
MATHEMATICA
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 *)
PROG
(Magma) [n : n in [0..150] | n mod 6 in [0, 2, 5]]; // Wesley Ivan Hurt, Jun 13 2016
CROSSREFS
Cf. A011655. [Gary Detlefs, Mar 19 2010]
Sequence in context: A108857 A132142 A045751 * A058591 A247062 A059009
KEYWORD
nonn,easy
STATUS
approved