A008805 Triangular numbers repeated.
1, 1, 3, 3, 6, 6, 10, 10, 15, 15, 21, 21, 28, 28, 36, 36, 45, 45, 55, 55, 66, 66, 78, 78, 91, 91, 105, 105, 120, 120, 136, 136, 153, 153, 171, 171, 190, 190, 210, 210, 231, 231, 253, 253, 276, 276, 300, 300, 325, 325, 351, 351, 378, 378, 406, 406, 435, 435
Offset: 0
Examples
a(5) = 6, since (5) + 2 = 7 has three nondecreasing partitions with exactly 2 parts: (1,6),(2,5),(3,4). The sum of the first parts of these partitions = 1 + 2 + 3 = 6. - _Wesley Ivan Hurt_, Jun 08 2013
References
- H. D. Brunk, An Introduction to Mathematical Statistics, Ginn, Boston, 1960; p. 360.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..3000
- G. E. Andrews, M. Beck, and N. Robbins, Partitions with fixed differences between largest and smallest parts, arXiv preprint arXiv:1406.3374 [math.NT], 2014.
- P. Flajolet and R. Sedgewick, Analytic Combinatorics, 2009; see page 46.
- Juan B. Gil and Jessica A. Tomasko, Pattern-avoiding even and odd Grassmannian permutations, arXiv:2207.12617 [math.CO], 2022.
- Jia Huang, Partially Palindromic Compositions, J. Int. Seq. (2023) Vol. 26, Art. 23.4.1. See pp. 4, 19.
- Kival Ngaokrajang, The distinct symmetric 5-gons in a regular n-gon for n = 6..13
- D. Opalka and W. Domcke, High-order expansion of T2xt2 Jahn-Teller potential energy surfaces in tetrahedral molecules, J. Chem. Phys., 132, 154108 (2010).
- Christopher Scussel, Illustration of layers in regular n-gons with all diagonals drawn
- Vladimir Shevelev, A problem of enumeration of two-color bracelets with several variations, arXiv:0710.1370 [math.CO], 2007-2011.
- Index entries for two-way infinite sequences
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
- Index entries for Molien series
Crossrefs
Programs
-
GAP
List([0..60], n-> (2*n +3 +(-1)^n)*(2*n +7 +(-1)^n)/32); # G. C. Greubel, Sep 12 2019
-
Haskell
import Data.List (transpose) a008805 = a000217 . (`div` 2) . (+ 1) a008805_list = drop 2 $ concat $ transpose [a000217_list, a000217_list] -- Reinhard Zumkeller, Feb 01 2013
-
Magma
[(2*n+3+(-1)^n)*(2*n+7+(-1)^n)/32 : n in [0..50]]; // Wesley Ivan Hurt, Apr 22 2015
-
Maple
A008805:=n->(2*n+3+(-1)^n)*(2*n+7+(-1)^n)/32: seq(A008805(n), n=0..50); # Wesley Ivan Hurt, Apr 22 2015
-
Mathematica
CoefficientList[Series[1/(1-x^2)^2/(1-x), {x, 0, 50}], x] Table[Binomial[Floor[n/2] + 2, 2], {n, 0, 57}] (* Michael De Vlieger, Oct 03 2016 *)
-
PARI
a(n)=(n\2+2)*(n\2+1)/2
-
Python
def A008805(n): return (m:=(n>>1)+1)*(m+1)>>1 # Chai Wah Wu, Oct 20 2023
-
Sage
[(2*n +3 +(-1)^n)*(2*n +7 +(-1)^n)/32 for n in (0..60)] # G. C. Greubel, Sep 12 2019
Formula
G.f.: 1/((1-x)*(1-x^2)^2) = 1/((1+x)^2*(1-x)^3).
E.g.f.: (exp(x)*(2*x^2 +12*x+ 11) - exp(-x)*(2*x -5))/16.
a(-n) = a(-5+n).
a(n) = binomial(floor(n/2)+2, 2). - Vladimir Shevelev, May 03 2011
From Paul Barry, May 31 2003: (Start)
a(n) = ((2*n +5)*(-1)^n + (2*n^2 +10*n +11))/16.
a(n) = Sum_{k=0..n} ((k+2)*(1+(-1)^k))/4. (End)
From Paul Barry, Apr 16 2005: (Start)
a(n) = Sum_{k=0..n} floor((k+2)/2)*(1-(-1)^(n+k-1))/2.
a(n) = Sum_{k=0..floor(n/2)} floor((n-2k+2)/2). (End)
A signed version is given by Sum_{k=0..n} (-1)^k*floor(k^2/4). - Paul Barry, Aug 19 2003
a(n) = A108299(n-2,n)*(-1)^floor((n+1)/2) for n>1. - Reinhard Zumkeller, Jun 01 2005
a(n) = Sum_{i=1..floor((n+2)/2)} i. - Wesley Ivan Hurt, Jun 08 2013
a(n) = (1/2)*floor((n+2)/2)*(floor((n+2)/2)+1). - Wesley Ivan Hurt, Jun 08 2013
From Wesley Ivan Hurt, Apr 22 2015: (Start)
a(n) = a(n-1) +2*a(n-2) -2*a(n-3) -a(n-4) +a(n-5).
a(n) = (2*n +3 +(-1)^n)*(2*n +7 +(-1)^n)/32. (End)
a(n-1) = A054252(n,1) = A054252(n^2-1), n >= 1. See a Oct 03 2016 comment above. - Wolfdieter Lang, Oct 03 2016
From Ambrosio Valencia-Romero, Apr 17 2022: (Start)
a(n) = a(n-1) if n odd, a(n) = a(n-1) + (n+2)/2 if n is even, for n > 0, a(0) = 1.
a(n) = (n+1)*(n+3)/8 if n odd, a(n) = (n+2)*(n+4)/8 if n is even, for n >= 0.
a(n) = A002620(n+2) - a(n-1), for n > 0, a(0) = 1.
a(n) = A142150(n+2) + a(n-1), for n > 0, a(0) = 1.
Comments