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.

A032765 a(n) = floor(n*(n+1)*(n+2) / (n + n+1 + n+2)) = floor(n*(n+2)/3).

Original entry on oeis.org

0, 1, 2, 5, 8, 11, 16, 21, 26, 33, 40, 47, 56, 65, 74, 85, 96, 107, 120, 133, 146, 161, 176, 191, 208, 225, 242, 261, 280, 299, 320, 341, 362, 385, 408, 431, 456, 481, 506, 533, 560, 587, 616, 645, 674, 705, 736, 767, 800, 833, 866, 901, 936, 971, 1008
Offset: 0

Views

Author

Patrick De Geest, May 15 1998

Keywords

Comments

Satisfies a(n+1) - 2*a(n) + a(n-1) = (2/3)*(1 + w^(n+1) + w^(2*n+2)), a(0)=0 & a(1)=1 where w is the imaginary cubic root of unity. - Robert G. Wilson v, Jun 24 2002
First differences have this pattern: (+1) +1 +1 +3 +3 +3 +5 +5 +5 +7 +7 +7 +9 +9 +9. - Alexandre Wajnberg, Dec 19 2005
In Duistermaat (2010) section 11.3 The Planar Four-Bar Link on page 516: "It follows from (4.3.2) that the number of k-periodic fibers of the QRT automorphism, counted with multiplicities, is equal to nu((tau^S)^k) = 3*n^2 - 1 when k = 3*n, 3*n^2 + 2*n when k = 3*n + 1, 3*n^2 + 4*n + 1 when k = 3*n + 2, for every integer n." - Michael Somos, Mar 14 2023
a(n-1) is the maximum number of edges in a graph with vertices labeled from 1 to n, such that there is no triangle whose sum of vertex labels is divisible by n. - Hoang Xuan Thanh, Jun 11 2025

Examples

			G.f. = x + 2*x^2 + 5*x^3 + 8*x^4 + 11*x^5 + 16*x^6 + 21*x^7 + 26*x^8 + ... - _Michael Somos_, Mar 14 2023
Let n = 5: a(5-1) = 8. Consider the graph G(5) with vertex set {1, 2, 3, 4, 5} and the edge set: E = {12, 23, 34, 45, 51, 13, 24, 35}, which contains 8 edges. The triangles in this graph are: {123}, {234}, {345}, {135}. Their vertex sums are: 1+2+3 = 6, 2+3+4 = 9, 3+4+5 = 12, 1+3+5=9. Since none of these sums are divisible by 5, the graph satisfies the required condition. If we add the edge 14, a new triangle {145} would appear, whose vertex sum is 1+4+5 = 10, divisible by 5. Similarly, if we add the edge 25, the triangle {235} would form, with vertex sum 2+3+5 = 10, also divisible by 5. - _Hoang Xuan Thanh_, Jun 11 2025
		

References

  • Johannes J. Duistermaat, Discrete Integrable Systems, Springer Science+Business Media, 2010.

Crossrefs

Programs

  • Maple
    A032765:=n->floor(n*(n+2)/3); seq(A032765(n), n=0..100); # Wesley Ivan Hurt, Dec 20 2013
  • Mathematica
    Table[Floor[n (n + 1)(n + 2)/(n + (n + 1) + (n + 2))], {n, 0, 55}]
    Table[Floor[n (n + 2)/3], {n, 0, 100}] (* Wesley Ivan Hurt, Dec 20 2013 *)
    LinearRecurrence[{2, -1, 1, -2, 1}, {0, 1, 2, 5, 8}, 60] (* Harvey P. Dale, Jun 06 2016 *)
    Table[(3 n (n + 2) + 2 Cos[2 n Pi/3] + 2 Sqrt[3] Sin[2 n Pi/3] - 2)/9, {n, 0, 20}] (* Eric W. Weisstein, Jul 27 2025 *)
    CoefficientList[Series[x (-1 - 2 x^2 + x^3)/((-1 + x)^3 (1 + x + x^2)), {x, 0, 20}], x] (* Eric W. Weisstein, Jul 27 2025 *)
  • PARI
    a(n)=n*(n+2)\3 \\ Charles R Greathouse IV, Jun 11 2015

Formula

From Ralf Stephan, May 05 2004: (Start)
a(n) = n^2 - ceiling(n*(n-1)/3).
G.f.: x*(1+2x^2-x^3)/((1+x+x^2)(1-x)^3). (End)
a(n) = floor(n*(n+2)/3). - Saburo Tamura, sent by Alexandre Wajnberg, Dec 19 2005
a(3*n - 1) = 3*n^2 - 1, a(3*n) = 3*n^2 + 2*n, a(3*n + 1) = 3*n^2 + 4*n + 1. - Michael Somos, Mar 14 2023
a(n+5) = A000217(n+5) - A001399(n+3) - A001399(n). - Hoang Xuan Thanh, Jun 11 2025
Sum_{n>=1} (-1)^(n+1)/a(n) = -1/4 + (Pi/(2*sqrt(3)))*(2-cosec(Pi/sqrt(3))). - Amiram Eldar, Jun 18 2025

Extensions

Name change suggested by Wesley Ivan Hurt, Dec 20 2013