login
A047244
Numbers that are congruent to {0, 2, 3} mod 6.
3
0, 2, 3, 6, 8, 9, 12, 14, 15, 18, 20, 21, 24, 26, 27, 30, 32, 33, 36, 38, 39, 42, 44, 45, 48, 50, 51, 54, 56, 57, 60, 62, 63, 66, 68, 69, 72, 74, 75, 78, 80, 81, 84, 86, 87, 90, 92, 93, 96, 98, 99, 102, 104, 105, 108, 110, 111, 114, 116, 117, 120, 122, 123
OFFSET
1,2
FORMULA
G.f.: x^2*(2+x+3*x^2) / ((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-7-2*cos(2*n*Pi/3))/3.
a(3k) = 6k-3, a(3k-1) = 6k-4, a(3k-2) = 6k-6. (End)
E.g.f.: (9 + (6*x - 7)*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) = (3-sqrt(3))*Pi/18 + log(2+sqrt(3))/(2*sqrt(3)) + log(2)/3. - Amiram Eldar, Dec 14 2021
MAPLE
A047244:=n->(6*n-7-2*cos(2*n*Pi/3))/3: seq(A047244(n), n=1..100); # Wesley Ivan Hurt, Jun 13 2016
MATHEMATICA
Select[Range[0, 200], Mod[#, 6] == 0 || Mod[#, 6] == 2 || Mod[#, 6] == 3 &] (* Vladimir Joseph Stephan Orlovsky, Jul 07 2011 *)
Select[Range[0, 200], MemberQ[{0, 2, 3}, Mod[#, 6]] &] (* Vincenzo Librandi, Oct 02 2015 *)
LinearRecurrence[{1, 0, 1, -1}, {2, 3, 6, 8}, {0, 20}] (* Eric W. Weisstein, Apr 09 2018 *)
CoefficientList[Series[x (2 + x + 3 x^2)/((-1 + x)^2 (1 + x + x^2)), {x, 0, 20}], x] (* Eric W. Weisstein, Apr 09 2018 *)
Table[(6 n + Cos[2 n Pi/3] + Sqrt[3] Sin[2 n Pi/3] - 1)/3, {n, 0, 20}] (* Eric W. Weisstein, Apr 09 2018 *)
PROG
(PARI) isok(n) = my(m = n % 6); (m==0) || (m==2) || (m==3); \\ Michel Marcus, Oct 02 2015
(Magma) [n : n in [0..130] | n mod 6 in [0, 2, 3]]; // Vincenzo Librandi, Oct 02 2015
CROSSREFS
Sequence in context: A032711 A135768 A287659 * A111215 A099381 A289943
KEYWORD
nonn,easy
STATUS
approved