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.

Showing 1-10 of 14 results. Next

A008805 Triangular numbers repeated.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Number of choices for nonnegative integers x,y,z such that x and y are even and x + y + z = n.
Diagonal sums of A002260, when arranged as a number triangle. - Paul Barry, Feb 28 2003
a(n) = number of partitions of n+4 such that the differences between greatest and smallest parts are 2: a(n-4) = A097364(n,2) for n>3. - Reinhard Zumkeller, Aug 09 2004
For n >= i, i=4,5, a(n-i) is the number of incongruent two-color bracelets of n beads, i from them are black (cf. A005232, A032279), having a diameter of symmetry. - Vladimir Shevelev, May 03 2011
Prefixing A008805 by 0,0,0,0 gives the sequence c(0), c(1), ... defined by c(n)=number of (w,x,y) such that w = 2x+2y, where w,x,y are all in {1,...,n}; see A211422. - Clark Kimberling, Apr 15 2012
Partial sums of positive terms of A142150. - Reinhard Zumkeller, Jul 07 2012
The sum of the first parts of the nondecreasing partitions of n+2 into exactly two parts, n >= 0. - Wesley Ivan Hurt, Jun 08 2013
Number of the distinct symmetric pentagons in a regular n-gon, see illustration for some small n in links. - Kival Ngaokrajang, Jun 25 2013
a(n) is the number of nonnegative integer solutions to the equation x + y + z = n such that x + y <= z. For example, a(4) = 6 because we have 0+0+4 = 0+1+3 = 0+2+2 = 1+0+3 = 1+1+2 = 2+0+2. - Geoffrey Critzer, Jul 09 2013
a(n) is the number of distinct opening moves in n X n tic-tac-toe. - I. J. Kennedy, Sep 04 2013
a(n) is the number of symmetry-allowed, linearly-independent terms at n-th order in the series expansion of the T2 X t2 vibronic perturbation matrix, H(Q) (cf. Opalka & Domcke). - Bradley Klee, Jul 20 2015
a(n-1) also gives the number of D_4 (dihedral group of order 4) orbits of an n X n square grid with squares coming in either of two colors and only one square has one of the colors. - Wolfdieter Lang, Oct 03 2016
Also, this sequence is the third column in the triangle of the coefficients of the sum of two consecutive Fibonacci polynomials F(n+1, x) and F(n, x) (n>=0) in ascending powers of x. - Mohammad K. Azarian, Jul 18 2018
In an n-person symmetric matching pennies game (a zero-sum normal-form game) with n > 2 symmetric and indistinguishable players, each with two strategies (viz. heads or tails), a(n-3) is the number of distinct subsets of players that must play the same strategy to avoid incurring losses (single pure Nash equilibrium in the reduced game). The total number of distinct partitions is A000217(n-1). - Ambrosio Valencia-Romero, Apr 17 2022
a(n) is the number of connected bipartite graphs with n+1 edges and a stable set of cardinality 2. - Christian Barrientos, Jun 15 2022
a(n) is the number of 132-avoiding odd Grassmannian permutations of size n+2. - Juan B. Gil, Mar 10 2023
Consider a regular n-gon with all diagonals drawn. Define a "layer" to be the set of all regions sharing an edge with the exterior. Removing a layer creates another layer. Count the layers, removing them until none remain. The number of layers is a(n-2). See illustration. - Christopher Scussel, Nov 07 2023

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.

Crossrefs

Cf. A000217, A002260, A002620, A006918 (partial sums), A054252, A135276, A142150, A158920 (binomial trans.).

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) = A004125(n+3) - A049798(n+2). - Carl Najafi, Jan 31 2013
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
a(n) = A000217(A008619(n)). - Guenther Schrack, Sep 12 2018
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.
a(n) = A000217(n+3)/2 - A135276(n+3)/2. (End)

A117989 Number of partitions of n such that the least part occurs at least twice.

Original entry on oeis.org

0, 1, 1, 3, 3, 7, 8, 14, 18, 28, 35, 53, 67, 94, 121, 165, 209, 280, 353, 462, 582, 749, 935, 1192, 1480, 1862, 2302, 2871, 3526, 4366, 5335, 6555, 7976, 9737, 11789, 14317, 17259, 20845, 25032, 30093, 35992, 43087, 51347, 61216, 72710, 86362, 102235
Offset: 1

Views

Author

Emeric Deutsch, Apr 08 2006

Keywords

Comments

More generally, the g.f. for the number of partitions of n such that the least part occurs at least m times is sum(x^(mk)/product(1-x^j, j=k..infinity), k=1..infinity). Also, the number of partitions of n such that if k is the largest part, then k>=2 and k-1 does not occur. Example: a(5)=3 because we have [5],[4,1] and [3,1,1].
Also, the number of partitions of 2n such that the difference between greatest part and smallest part is n. - Vladeta Jovovic, May 09 2008

Examples

			a(5) = 3 because we have [3,1,1], [2,1,1,1] and [1,1,1,1,1].
		

Crossrefs

Programs

  • Haskell
    a117989 n = a117989_list !! (n-1)
    a117989_list = tail $ zipWith (-)
                          (map (* 2) a000041_list) $ tail a000041_list
    -- Reinhard Zumkeller, Nov 12 2015
  • Maple
    g:=sum(x^k*(1-x^(k-1))/product(1-x^j,j=1..k),k=2..70): gser:=series(g,x=0,55): seq(coeff(gser,x,n),n=1..50);
    A117989 := proc(n)
        2*combinat[numbpart](n)-combinat[numbpart](n+1) ;
    end proc: # R. J. Mathar, May 19 2016
  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Count[#,Min[#]]>1&]], {n,50}]  (* Harvey P. Dale, Apr 23 2011 *)
    max = 48; Sum[x^(2*k)/Product[1 - x^j, {j, k, Infinity}], {k, 1, Ceiling[ max/2]}] + O[x]^max // CoefficientList[#, x]& // Rest (* Jean-François Alcover, Sep 11 2017 *)

Formula

G.f.: sum(k>=1, x^(2*k)/prod(j>=k, 1-x^j ) ).
G.f.: sum(k>=1, x^k*(1-x^(k-1))/prod(j=1..k, 1-x^j ) ).
a(n) = 2*A000041(n) - A000041(n+1). - Vladeta Jovovic, Jul 21 2006
a(n) = A056823(n+1) - 2*A056823(n). - Bob Selcoe, Apr 11 2014
a(n) ~ exp(Pi*sqrt(2*n/3)) / (4*sqrt(3)*n) * (1 - (sqrt(3/2)/Pi + 25*Pi/(24*sqrt(6))) / sqrt(n)). - Vaclav Kotesovec, Nov 03 2020

A116685 Triangle read by rows: T(n,k) is number of partitions of n that have k parts smaller than the largest part (n>=1, k>=0).

Original entry on oeis.org

1, 2, 2, 1, 3, 1, 1, 2, 3, 1, 1, 4, 2, 3, 1, 1, 2, 5, 3, 3, 1, 1, 4, 4, 6, 3, 3, 1, 1, 3, 6, 6, 7, 3, 3, 1, 1, 4, 6, 10, 7, 7, 3, 3, 1, 1, 2, 9, 10, 12, 8, 7, 3, 3, 1, 1, 6, 6, 15, 14, 13, 8, 7, 3, 3, 1, 1, 2, 11, 15, 20, 16, 14, 8, 7, 3, 3, 1, 1, 4, 10, 21, 22, 24, 17, 14, 8, 7, 3, 3, 1, 1, 4, 11, 21
Offset: 1

Views

Author

Emeric Deutsch, Feb 23 2006

Keywords

Comments

Same as A097364 without the 0's.
Also number of partitions of n such that the difference between the largest and smallest parts is k (see A097364). Example: T(6,2)=3 because we have [4,2],[3,2,1] and [3,1,1,1].
Row 1 has one term; row n (n>=2) has n-1 terms.
Row sums yield the partition numbers (A000041).
T(n,0)=A000005(n) (number of divisors of n).
T(n,1)=A049820(n) (n minus number of divisors of n).
T(n,2)=A008805(n-4) for n>=4.
Sum(k*T(n,k),k=0..n-2)=A116686

Examples

			Triangle starts:
01:  1
02:  2
03:  2  1
04:  3  1  1
05:  2  3  1  1
06:  4  2  3  1  1
07:  2  5  3  3  1  1
08:  4  4  6  3  3  1 1
09:  3  6  6  7  3  3 1 1
10:  4  6 10  7  7  3 3 1 1
11:  2  9 10 12  8  7 3 3 1 1
12:  6  6 15 14 13  8 7 3 3 1 1
13:  2 11 15 20 16 14 8 7 3 3 1 1
14:  4 10 21 22 24 17 ...
T(6,2)=3 because we have [4,1,1],[3,2,1] and [2,2,1,1].
		

Crossrefs

Columns k=3-10 give: A128508, A218567, A218568, A218569, A218570, A218571, A218572, A218573. T(2*n,n) = A117989(n). - Alois P. Heinz, Nov 02 2012

Programs

Formula

G.f.: sum(i>=1, x^i/(1-x^i)/prod(j=1..i-1, 1-t*x^j) ).

A128508 Number of partitions p of n such that max(p) - min(p) = 3.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 3, 3, 7, 7, 12, 14, 20, 22, 32, 34, 45, 51, 63, 69, 87, 93, 112, 124, 144, 156, 184, 196, 225, 245, 275, 295, 335, 355, 396, 426, 468, 498, 552, 582, 637, 679, 735, 777, 847, 889, 960, 1016, 1088, 1144, 1232, 1288, 1377, 1449, 1539, 1611, 1719
Offset: 0

Views

Author

John W. Layman, May 07 2007

Keywords

Comments

See A008805 and A049820 for the numbers of partitions p of n such that max(p)-min(p)=1 or 2, respectively.

Crossrefs

Programs

  • Mathematica
    np[n_]:=Length[Select[IntegerPartitions[n],Max[#]-Min[#]==3&]]; Array[np,60] (* Harvey P. Dale, Jul 02 2012 *)

Formula

Conjecture. a(1)=0 and, for n>1, a(n+1)=a(n)+d(n), where d(n) is defined as follows: d=0,0,0,1,0 for n=1,...,5 and, for n>5, d(n)=d(n-2)+1 if n=6k or n=6k+4, d(n)=d(n-2) if n=6k+1 or n=6k+3, d(n)=d(n-2)+2Floor[n/6] if n=6k+2 and d(n)=d(n-5) if n=6k+5.
G.f. for number of partitions p of n such that max(p)-min(p) = m is Sum_{k>0} x^(2*k+m)/Product_{i=0..m} (1-x^(k+i)). - Vladeta Jovovic, Jul 04 2007
a(n) = A097364(n,3) = A116685(n,3) = A117143(n) - A117142(n). - Alois P. Heinz, Nov 02 2012

Extensions

More terms from Vladeta Jovovic, Jul 04 2007

A218567 Number of partitions p of n such that max(p)-min(p) = 4.

Original entry on oeis.org

1, 1, 3, 3, 7, 8, 13, 16, 24, 27, 40, 46, 60, 71, 92, 103, 131, 149, 181, 206, 247, 275, 329, 366, 424, 474, 548, 601, 690, 759, 858, 942, 1059, 1152, 1293, 1404, 1555, 1690, 1869, 2013, 2218, 2390, 2614, 2812, 3066, 3282, 3574, 3820, 4131, 4415, 4769, 5071
Offset: 6

Views

Author

Alois P. Heinz, Nov 02 2012

Keywords

Programs

Formula

G.f.: Sum_{k>0} x^(2*k+4)/Product_{j=0..4} (1-x^(k+j)).
a(n) = A097364(n,4) = A116685(n,4) = A194621(n,4) - A194621(n,3) = A218506(n) - A117143(n).

A218573 Number of partitions p of n such that max(p) - min(p) = 10.

Original entry on oeis.org

1, 1, 3, 3, 7, 8, 14, 18, 28, 35, 53, 67, 93, 119, 161, 201, 267, 332, 428, 531, 674, 824, 1034, 1258, 1552, 1877, 2294, 2749, 3332, 3970, 4762, 5645, 6723, 7916, 9367, 10974, 12894, 15036, 17571, 20381, 23696, 27370, 31652, 36416, 41926, 48029, 55071, 62860
Offset: 12

Views

Author

Alois P. Heinz, Nov 02 2012

Keywords

Programs

Formula

G.f.: Sum_{k>0} x^(2*k+10)/Product_{j=0..10} (1-x^(k+j)).
a(n) = A097364(n,10) = A116685(n,10) = A194621(n,10) - A194621(n,9) = A218512(n) - A218511(n).

A218568 Number of partitions p of n such that max(p)-min(p) = 5.

Original entry on oeis.org

1, 1, 3, 3, 7, 8, 14, 17, 26, 31, 45, 54, 73, 87, 114, 135, 171, 200, 249, 290, 352, 406, 487, 560, 660, 752, 879, 997, 1153, 1298, 1489, 1671, 1900, 2121, 2397, 2665, 2992, 3311, 3701, 4081, 4535, 4982, 5514, 6042, 6655, 7265, 7977, 8686, 9502, 10314, 11248
Offset: 7

Views

Author

Alois P. Heinz, Nov 02 2012

Keywords

Programs

Formula

G.f.: Sum_{k>0} x^(2*k+5)/Product_{j=0..5} (1-x^(k+j)).
a(n) = A097364(n,5) = A116685(n,5) = A194621(n,5) - A194621(n,4) = A218507(n) - A218506(n).

A218569 Number of partitions p of n such that max(p)-min(p) = 6.

Original entry on oeis.org

1, 1, 3, 3, 7, 8, 14, 18, 27, 33, 49, 59, 81, 100, 131, 158, 205, 243, 306, 365, 448, 527, 642, 748, 896, 1042, 1231, 1418, 1667, 1906, 2215, 2527, 2909, 3298, 3781, 4260, 4847, 5446, 6158, 6886, 7756, 8633, 9669, 10738, 11970, 13239, 14713, 16212, 17943
Offset: 8

Views

Author

Alois P. Heinz, Nov 02 2012

Keywords

Programs

Formula

G.f.: Sum_{k>0} x^(2*k+6)/Product_{j=0..6} (1-x^(k+j)).
a(n) = A097364(n,6) = A116685(n,6) = A194621(n,6) - A194621(n,5) = A218508(n) - A218507(n).

A218570 Number of partitions p of n such that max(p)-min(p) = 7.

Original entry on oeis.org

1, 1, 3, 3, 7, 8, 14, 18, 28, 34, 51, 63, 86, 108, 144, 175, 229, 278, 351, 425, 529, 630, 775, 919, 1109, 1309, 1565, 1827, 2167, 2518, 2952, 3414, 3975, 4563, 5281, 6036, 6931, 7889, 9012, 10200, 11598, 13078, 14785, 16613, 18704, 20925, 23470, 26174, 29229
Offset: 9

Views

Author

Alois P. Heinz, Nov 02 2012

Keywords

Programs

  • Mathematica
    terms = 49; offset = 9; max = terms + offset; s[k0_ /; k0 > 0] := Sum[x^(2*k + k0)/Product[ (1 - x^(k + j)), {j, 0, k0}], {k, 1, Ceiling[max/2]}] + O[x]^max // CoefficientList[#, x] &; Drop[s[7], offset] (* Jean-François Alcover, Sep 11 2017, after Alois P. Heinz *)

Formula

G.f.: Sum_{k>0} x^(2*k+7)/Product_{j=0..7} (1-x^(k+j)).
a(n) = A097364(n,7) = A116685(n,7) = A194621(n,7) - A194621(n,6) = A218509(n) - A218508(n).

A218571 Number of partitions p of n such that max(p)-min(p) = 8.

Original entry on oeis.org

1, 1, 3, 3, 7, 8, 14, 18, 28, 35, 52, 65, 90, 113, 152, 188, 246, 302, 387, 471, 591, 714, 884, 1059, 1292, 1538, 1857, 2193, 2621, 3077, 3646, 4254, 4999, 5801, 6772, 7815, 9062, 10409, 12002, 13719, 15733, 17909, 20438, 23169, 26318, 29722, 33623, 37833
Offset: 10

Views

Author

Alois P. Heinz, Nov 02 2012

Keywords

Programs

  • Mathematica
    terms = 48; offset = 10; max = terms + offset; s[k0_ /; k0 > 0] := Sum[x^(2*k + k0)/Product[ (1 - x^(k + j)), {j, 0, k0}], {k, 1, Ceiling[max/2]}] + O[x]^max // CoefficientList[#, x] &; Drop[s[8], offset] (* Jean-François Alcover, Sep 11 2017, after Alois P. Heinz *)

Formula

G.f.: Sum_{k>0} x^(2*k+8)/Product_{j=0..8} (1-x^(k+j)).
a(n) = A097364(n,8) = A116685(n,8) = A194621(n,8) - A194621(n,7) = A218510(n) - A218509(n).
Showing 1-10 of 14 results. Next