login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A058212 a(n) = 1 + floor(n*(n-3)/6). 6
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, 100, 109, 117, 126, 136, 145, 155, 166, 176, 187, 199, 210, 222, 235, 247, 260, 274, 287, 301, 316, 330, 345, 361, 376, 392, 409, 425, 442, 460, 477 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,6

COMMENTS

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.

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..10000

S. A. Burr, B. Gr├╝nbaum and N. J. A. Sloane, The Orchard Problem, Geometriae Dedicata, 2 (1974), 397-424.

Index entries for linear recurrences with constant coefficients, signature (2,-1,1,-2,1)

FORMULA

G.f.: (1-2x+x^2+x^4)/((1-x)^2(1-x^3)); a(n)=4cos(2*Pi*n/3)/9+(3n^2-9n+10)/18. - Paul Barry, Mar 18 2004

PROG

(Sage) [ceil(binomial(n, 2)/3) for n in xrange(-1, 55)] # Zerinvary Lajos, Dec 03 2009

(Haskell)

a058212 n = 1 + n * (n - 3) `div` 6  -- Reinhard Zumkeller, May 08

(PARI) a(n)=n*(n-3)\6 + 1 \\ Charles R Greathouse IV, Jun 11 2015

CROSSREFS

Cf. A003035.

Apart from initial term, same as A007997.

The third diagonal of A061857.

Sequence in context: A092311 A186386 A247589 * A007997 A123120 A194462

Adjacent sequences:  A058209 A058210 A058211 * A058213 A058214 A058215

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane, Nov 30 2000

EXTENSIONS

Zerinvary Lajos, Dec 07 2009

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 14:15 EDT 2019. Contains 322386 sequences. (Running on oeis4.)