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.

Showing 1-2 of 2 results.

A186731 a(3n) = 2n, a(3n+1) = n, a(3n+2) = n+1.

Original entry on oeis.org

0, 0, 1, 2, 1, 2, 4, 2, 3, 6, 3, 4, 8, 4, 5, 10, 5, 6, 12, 6, 7, 14, 7, 8, 16, 8, 9, 18, 9, 10, 20, 10, 11, 22, 11, 12, 24, 12, 13, 26, 13, 14, 28, 14, 15, 30, 15, 16, 32, 16, 17, 34, 17, 18, 36, 18, 19, 38, 19, 20, 40, 20, 21, 42, 21, 22, 44, 22, 23, 46, 23, 24, 48
Offset: 0

Views

Author

Philippe Deléham, Jan 21 2012

Keywords

Crossrefs

Column k = 2 of triangle in A198295.

Programs

  • Magma
    I:=[0,0,1,2,1,2]; [n le 6 select I[n] else 2*Self(n-3)-Self(n-6): n in [1..80]]; // Vincenzo Librandi, Apr 28 2015
    
  • Maple
    f:= gfun:-rectoproc({a(n)=2*a(n-3)-a(n-6), seq(a(i) = [0,0,1,2,1,2][i+1],i=0..5)},a(n),remember):
    map(f, [$0..100]); # Robert Israel, Apr 01 2016
  • Mathematica
    CoefficientList[Series[(x*(1 + x)/(1 - x^3))^2, {x, 0, 100}], x] (* Wesley Ivan Hurt, Apr 28 2015 *)
    LinearRecurrence[{0, 0, 2, 0, 0, -1}, {0, 0, 1, 2, 1, 2}, 100] (* Vincenzo Librandi, Apr 28 2015 *)
  • PARI
    vector(50,n,n--;(n+1+n*0^(n%3)-(n+1)%3)/3) \\ Derek Orr, Apr 28 2015

Formula

G.f.: (x*(1+x)/(1-x^3))^2.
a(n) = |A099254(n-2)| = |A099470(n-1)|. - R. J. Mathar, May 02 2013
From Wesley Ivan Hurt, Apr 28 2015: (Start)
a(n) = 2*a(n-3)-a(n-6).
a(n) = (n+1+n*0^mod(n,3)-mod(n+1,3))/3. (End)
E.g.f.: (4/9)*x*exp(x) - (x/9)*exp(-x/2)*cos(sqrt(3)*x/2) - (sqrt(3)/9)*(2+x)*exp(-x/2)*sin(sqrt(3)*x/2). - Robert Israel, Apr 01 2016
From Ridouane Oudra, Nov 24 2024: (Start)
a(n) = n^3/6 - n/6 - (n^2 + 3*n/2 - 5/2)*floor(n/3) + (3*n/2 + 9/2)*floor(n/3)^2.
a(n) = t(n+1)*t(n+3) - t(n-1)*t(n+1), where t(n) = A002264(n).
a(n) = A008130(n+1) - A008130(n-1). (End)
Sum_{n>=2} (-1)^n/a(n) = 3*log(2)/2. - Amiram Eldar, May 10 2025

Extensions

More terms from Vincenzo Librandi, Apr 28 2015

A099471 A sequence generated from the Quadrifoil (flat knot).

Original entry on oeis.org

1, 0, -2, -3, -1, 3, 5, 2, -4, -7, -3, 5, 9, 4, -6, -11, -5, 7, 13, 6, -8, -15, -7, 9, 17, 8, -10, -19, -9, 11, 21, 10, -12, -23, -11, 13, 25, 12, -14, -27, -13, 15, 29, 14, -16, -31, -15, 17, 33, 16, -18, -35, -17, 19, 37, 18, -20, -39, -19, 21, 41, 20, -22
Offset: 0

Views

Author

Gary W. Adamson, Oct 17 2004

Keywords

Comments

a(3*n), n = 1,2,3... = 2*n + 1, unsigned. Odifreddi, p. 135 states: "Since the trefoil has polynomial x^2 - x + 1 and the quadrifoil (or flat knot) is the sum of two trefoils, its polynomial is (x^2 - x + 1) = x^4 - 2*x^3 + 3*x^2 - 2*x + 1."

Examples

			a(6) = 5 since M^6 * [1 1 1 1] = [ -3 -1 3 5].
		

References

  • P. Odifreddi, "The Mathematical Century; The 30 Greatest Problems of the Last 100 Years", Princeton University Press, page 135.

Crossrefs

Cf. A099470.

Programs

  • Maple
    a:= proc(n) local m, r; r:= 1+irem(n, 6, 'm');
          [1, 0, -2, -3, -1, 3][r] +m*[4, 2, -2, -4, -2, 2][r]
        end:
    seq(a(n), n=0..80);  # Alois P. Heinz, May 25 2013
  • Mathematica
    Table[((9 + 6 n) Cos[Pi n/3] - 5 Sqrt[3] Sin[Pi n/3])/9, {n, 0, 20}] (* Vladimir Reshetnikov, Sep 09 2016 *)
    LinearRecurrence[{2,-3,2,-1},{1,0,-2,-3},70] (* Harvey P. Dale, Mar 27 2025 *)

Formula

a(n) = M^n * [1 1 1 1], rightmost term; where M = the 4 X 4 companion matrix to the Quadrifoil polynomial x^4 - 2*x^3 + 3*x^2 - 2*x + 1: [0 1 0 0 / 0 0 1 0 / 0 0 0 1 / -1 2 -3 2].
G.f.: -(x^3-x^2+2*x-1) / (x^2-x+1)^2. - Colin Barker, May 25 2013
a(n+1) = 1 - sum(A101950(n-k+2, k+2), k=0..floor(n/2)) - Johannes W. Meijer, Aug 06 2013
From A.H.M. Smeets, Sep 13 2018 (Start)
a(3*k) = a(3*k-1) + a(3*k+1) for k > 0.
a(3*k) = (-1)^k*(2*k+1) for k >= 0.
a(3*k+1) = (-1)^k*k for k >= 0.
a(3*k+2) = (-1)^(k+1)*(k+2) for k >= 0. (End)
Showing 1-2 of 2 results.