A002717 a(n) = floor(n(n+2)(2n+1)/8).
0, 1, 5, 13, 27, 48, 78, 118, 170, 235, 315, 411, 525, 658, 812, 988, 1188, 1413, 1665, 1945, 2255, 2596, 2970, 3378, 3822, 4303, 4823, 5383, 5985, 6630, 7320, 8056, 8840, 9673, 10557, 11493, 12483, 13528, 14630, 15790, 17010, 18291, 19635, 21043, 22517, 24058
Offset: 0
Examples
f(3)=13 because the following figure contains 13 triangles if horizontal bars are added: ....... /\ ...... /\/\ ..... /\/\/\ G.f. = x + 5*x^2 + 13*x^3 + 27*x^4 + 48*x^5 + 78*x^6 + 118*x^7 + 170*x^8 + ...
References
- J. H. Conway and R. K. Guy, The Book of Numbers, p. 83.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- T. D. Noe, Table of n, a(n) for n = 0..1000
- Ralph E. Edwards et al., Problem 889: A well-known problem, Math. Mag., 47 (1974), 289-292.
- F. Gerrish, How many triangles, Math. Gaz., 54 (1970), 241-246.
- J. Halsall, An interesting series, Math. Gaz., 46 (1962), 55-56.
- J. Halsall, An interesting series, Math. Gaz., 46 (1962), 55-56. [Annotated scanned copy]
- M. E. Larsen, The eternal triangle - a history of a counting problem, College Math. J., 20 (1989), 370-392.
- B. D. Mastrantone, How Many Triangles?, Math. Gaz., 55 (1971), 438-440.
- Hugo Pfoertner, Illustration of A002717(5) and A002717(6)
- Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
- Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992
- L. Smiley, A Quick Solution of Triangle Counting, Mathematics Magazine, 66, #1, Feb '93, p. 40.
- Eric Weisstein's World of Mathematics, Triangle Tiling.
- Index entries for linear recurrences with constant coefficients, signature (3,-2,-2,3,-1).
Crossrefs
Programs
-
Magma
[Floor(n*(n+2)*(2*n+1)/8): n in [0..50]]; // Wesley Ivan Hurt, Jun 04 2014
-
Maple
A002717:=n->floor(n*(n+2)*(2*n+1)/8); seq(A002717(n), n=0..100);
-
Mathematica
Table[Floor[n(n+2)(2n+1)/8],{n,0,50}] (* or *) LinearRecurrence[{3,-2,-2,3,-1},{0,1,5,13,27},50] (* Harvey P. Dale, Jan 20 2013 *)
-
PARI
{a(n) = n * (n+2) * (2*n+1) \ 8};
Formula
a(n) = (1/16)*[2n(2n+1)(n+2)+cos(Pi*n)-1]. - Justin C. Bozonier (justinb67(AT)excite.com), Dec 05 2000
a(m+1)-2a(m)+2a(m-2)-a(m-3) = 3. - Len Smiley, Oct 08 2001
a(n) = (2n(2n+1)(n+2)+(-1)^n-1)/16. - Wesley Petty (Wesley.Petty(AT)mail.tamucc.edu), Oct 25 2003
a(n) = Sum_{k=0..n} (-1)^(n-k)*k*binomial(k+1,2).
G.f.: x(1+2x)/((1+x)(1-x)^4). - Simon Plouffe in his 1992 dissertation (with a different offset).
a(0)=0, a(1)=1, a(2)=5, a(3)=13, a(4)=27, a(n)=3*a(n-1)-2*a(n-2)-2*a(n-3)+ 3*a(n-4)- a(n-5). - Harvey P. Dale, Jan 20 2013
a(n) = a(n-1) + A016777(floor(0.5*n))*floor(0.5+0.5*n). - Arlu Genesis A. Padilla, Jun 04 2014
a(n) = Sum_{i=1..n} T(n-i+1)+T(n-2*i+1), where T(n)=n*(n+1)/2=A000217(n) if n>0 and 0 if n<=0. So we have a(n+2)-a(n)=(n+2)^2+(n+1)*(n+2)/2. - Maurice Mischler, Sep 08 2014
E.g.f.: (x*(2*x^2 + 11*x + 9)*cosh(x) + (2*x^3 + 11*x^2 + 9*x - 1)*sinh(x))/8. - Stefano Spezia, Jul 19 2022
Comments