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.

A001859 Triangular numbers plus quarter-squares: n*(n+1)/2 + floor((n+1)^2/4) (i.e., A000217(n) + A002620(n+1)).

Original entry on oeis.org

0, 2, 5, 10, 16, 24, 33, 44, 56, 70, 85, 102, 120, 140, 161, 184, 208, 234, 261, 290, 320, 352, 385, 420, 456, 494, 533, 574, 616, 660, 705, 752, 800, 850, 901, 954, 1008, 1064, 1121, 1180, 1240, 1302, 1365, 1430, 1496, 1564, 1633, 1704, 1776, 1850, 1925
Offset: 0

Views

Author

Keywords

Comments

Number of series-reduced planted trees with n+7 nodes and 3 internal nodes.
The trees enumerated with 3 internal nodes are of two types. Those with all internal nodes at different heights are enumerated by the triangular numbers. Those with two internal nodes at the same height are enumerated by the quarter squares. - Michael Somos, May 19 2000
Number of pairs (x,y) with x in {0,...,n}, y even in {0,...,2n}, and x < y. - Clark Kimberling, Jul 02 2012

Examples

			For n=1 we find 2 planted trees with 8 nodes, 3 of which are internal (i) and 5 are endpoints (e):
.e...e...e...e....e...e....
...i.......i........i...e..
.......i..............i...e
.......e................i..
........................e..
G.f. = 2*x + 5*x^2 + 10*x^3 + 16*x^4 + 24*x^5 + 33*x^6 + 44*x^7 + 56*x^8 + ...
		

References

  • John Riordan, personal communication.
  • 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).

Crossrefs

First differences of A045947.
Antidiagonal sums of array A003984.
Cf. A185212 (odd terms).

Programs

  • Haskell
    a001859 n = a000217 n + a002620 (n + 1)  -- Reinhard Zumkeller, Dec 20 2012
  • Maple
    A001859:=(-1-z^2-2*z^3+z^4)/(z+1)/(z-1)^3; # conjectured by Simon Plouffe in his 1992 dissertation; gives sequence with an additional leading 1
    with (combinat):seq(count(Partition((3*n+2)), size=3), n=0..50); # Zerinvary Lajos, Mar 28 2008
  • Mathematica
    With[{nn=60},Total/@Thread[{Accumulate[Range[0,nn]],Floor[Range[ nn+1]^2/4]}]] (* or *) LinearRecurrence[{2,0,-2,1},{0,2,5,10},60] (* Harvey P. Dale, Apr 01 2012 *)
  • PARI
    {a(n) = n + (3*n^2 + 1) \ 4};
    

Formula

a(n) = A000217(n)+A002620(n+1).
a(n) = n + floor( (3n^2+1)/4 ).
G.f.: (2*x+x^2)/((1-x)^2*(1-x^2)).
a(n) = a(n-1) + a(n-2) - a(n-3) + 3 = A002378(n) - A002620(n) = A006578(n-1) + A004526(n+1) - Henry Bottomley, Mar 08 2000
a(n) = A006578(-1-n) for all n in Z. - Michael Somos, May 10 2006
From Mitch Harris, Aug 22 2006: (Start)
a(n) = (6n^2 + 8n + 1 - (-1)^n)/8;
a(n) = Sum_{k=0..n} max(k, n-k). (End)
Starting (2, 5, 10, 16, 24, ...), = binomial transform of [2, 3, 2, -1, 2, -4, 8, -16, 32, ...]. - Gary W. Adamson, Nov 30 2007
a(0)=0, a(1)=2, a(2)=5, a(3)=10, a(n) = 2*a(n-1) + 0*a(n-2) - 2*a(n-3) + a(n-4). - Harvey P. Dale, Apr 01 2012
a(n) = 3*n*(n+1)/2 - A006578(n). - Clark Kimberling, Jul 02 2012
a(2*n) = A045944(n), a(2*n - 1) = A049450(n) for all n in Z. - Michael Somos, Nov 03 2014
0 = -6 + a(n) - 2*a(n+2) + a(n+4) for all n in Z. - Michael Somos, Nov 03 2014
0 = a(n)*(+a(n+1) - a(n+2)) + a(n+1)*(-3 - a(n+1) + a(n+2)) for all n in Z. - Michael Somos, Nov 03 2014
a(n) = Sum_{k=1..n} floor((n+k+2)/2). - Wesley Ivan Hurt, Mar 31 2017
Sum_{n>=1} 1/a(n) = 3/4 - Pi/(4*sqrt(3)) + 3*log(3)/4. - Amiram Eldar, May 28 2022
E.g.f.: (x*(7 + 3*x)*cosh(x) + (1 + 7*x + 3*x^2)*sinh(x))/4. - Stefano Spezia, Aug 22 2023

Extensions

Entry improved by Michael Somos