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.

A058212 a(n) = 1 + floor(n*(n-3)/6).

This page as a plain text file.
%I A058212 #52 Aug 02 2025 08:28:22
%S A058212 1,0,0,1,1,2,4,5,7,10,12,15,19,22,26,31,35,40,46,51,57,64,70,77,85,92,
%T A058212 100,109,117,126,136,145,155,166,176,187,199,210,222,235,247,260,274,
%U A058212 287,301,316,330,345,361,376,392,409,425,442,460,477,495,514,532,551
%N A058212 a(n) = 1 + floor(n*(n-3)/6).
%C A058212 For n >= 3, number of solutions to x+y+z == 0 (mod n) with 0 <= x < y < z < n. E.g., for n=3 there is a unique solution, x=0, y=1, z=2.
%H A058212 Reinhard Zumkeller, <a href="/A058212/b058212.txt">Table of n, a(n) for n = 0..10000</a>
%H A058212 S. A. Burr, B. Grünbaum, and N. J. A. Sloane, <a href="http://neilsloane.com/doc/ORCHARD/orchard.html">The Orchard Problem</a>, Geometriae Dedicata, 2 (1974), 397-424.
%H A058212 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1,1,-2,1).
%F A058212 From _Paul Barry_, Mar 18 2004: (Start)
%F A058212 G.f.: (1 - 2x + x^2 + x^4)/((1 - x)^2(1 - x^3)).
%F A058212 a(n) = 4*cos(2*Pi*n/3)/9 + (3*n^2 - 9*n + 10)/18. (End)
%F A058212 E.g.f.: (exp(x)*(10 - 6*x + 3*x^2) + 8*exp(-x/2)*cos(sqrt(3)*x/2))/18. - _Stefano Spezia_, May 03 2023
%F A058212 Sum_{n>=3} 1/a(n) = 6 - (2*Pi/sqrt(3))*(1 - tanh(sqrt(5/3)*Pi/2)/sqrt(5)). - _Amiram Eldar_, May 06 2023
%t A058212 Table[Floor[(n(n-3))/6]+1,{n,0,70}] (* or *) LinearRecurrence[{2,-1,1,-2,1},{1,0,0,1,1},70] (* _Harvey P. Dale_, Jun 21 2021 *)
%o A058212 (Sage) [ceil(binomial(n,2)/3) for n in range(-1, 55)] # _Zerinvary Lajos_, Dec 03 2009
%o A058212 (Haskell)
%o A058212 a058212 n = 1 + n * (n - 3) `div` 6  -- _Reinhard Zumkeller_, May 08 2012
%o A058212 (PARI) a(n)=n*(n-3)\6 + 1 \\ _Charles R Greathouse IV_, Jun 11 2015
%Y A058212 Cf. A003035.
%Y A058212 Apart from initial term, same as A007997.
%Y A058212 The third diagonal of A061857.
%K A058212 nonn,easy
%O A058212 0,6
%A A058212 _N. J. A. Sloane_, Nov 30 2000
%E A058212 _Zerinvary Lajos_, Dec 07 2009