cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A047244 Numbers that are congruent to {0, 2, 3} mod 6.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [n : n in [0..130] | n mod 6 in [0, 2, 3]]; // Vincenzo Librandi, Oct 02 2015
  • 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 *)
  • PARI
    isok(n) = my(m = n % 6); (m==0) || (m==2) || (m==3); \\ Michel Marcus, Oct 02 2015
    

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