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-9 of 9 results.

A008642 Quarter-squares repeated.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 6, 6, 9, 9, 12, 12, 16, 16, 20, 20, 25, 25, 30, 30, 36, 36, 42, 42, 49, 49, 56, 56, 64, 64, 72, 72, 81, 81, 90, 90, 100, 100, 110, 110, 121, 121, 132, 132, 144, 144, 156, 156, 169, 169, 182, 182, 196, 196, 210, 210, 225, 225
Offset: 0

Views

Author

Keywords

Comments

The area of the largest rectangle whose perimeter is not greater than n. - Dmitry Kamenetsky, Aug 30 2006
Also number of partitions of n into parts 1, 2 or 4. - Reinhard Zumkeller, Aug 12 2011
Let us consider a rectangle composed of unit squares. Then count how many squares are necessary to surround this rectangle by a layer whose width is 1 unit. And repeat this surrounding ad libitum. This sequence, prepended by 4 zeros and with offset 0, gives the number of rectangles that need 2*n unit squares in one of their surrounding layers. - Michel Marcus, Sep 19 2015
a(n) is the number of nonnegative integer solutions (x,y,z) for n-2 <= 2*x + 3*y + 4*z <= n. For example, the two solutions for 1 <= 2*x + 3*y + 4*z <= 3 are (1,0,0) and (0,1,0). - Ran Pan, Oct 07 2015
Conjecture: Consider the number of compositions of n>=4*k+8 into odd parts, where the order of the parts 1,3,..,2k+1 does not count. Then, as k approaches infinity, a(n-4*k-8) is equal to the number of these restricted compositions minus A000009(n), the number of strict partitions of n. - Gregory L. Simay, Aug 12 2016
From Gus Wiseman, May 17 2019: (Start)
Also the number of length-3 integer partitions of n + 4 whose largest part is greater than the sum of the other two. These are unordered triples that cannot be the sides of a triangle. For example, the a(1) = 1 through a(10) = 9 partitions are (A = 10, B = 11, C = 12):
(311) (411) (421) (521) (522) (622) (632) (732) (733) (833)
(511) (611) (531) (631) (641) (741) (742) (842)
(621) (721) (722) (822) (751) (851)
(711) (811) (731) (831) (832) (932)
(821) (921) (841) (941)
(911) (A11) (922) (A22)
(931) (A31)
(A21) (B21)
(B11) (C11)
(End)
This sequence, prepended by four 0's and with offset 0, is the number of partitions of n into four parts whose smallest two parts are equal. - Wesley Ivan Hurt, Jan 05 2021
This sequence, prepended by four 0's and with offset 0, is the number of incongruent obtuse triangles formed from the vertices of a regular n-gon. - Frank M Jackson, Nov 27 2022

References

  • D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 105.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 112, D(n).

Crossrefs

Cf. A002620.
Cf. A001399, A005044 (triangles without self-intersections), A069905, A124278, A266223, A325686, A325689, A325690, A325691, A325695.

Programs

  • Magma
    [Floor(((n+1)*((-1)^n+n+6)+9)/16): n in [0..70]]; // Vincenzo Librandi, Apr 02 2014
    
  • Maple
    seq((7/8+(-1)^k/8 + k + k^2/4)$2, k=0..100); # Robert Israel, Oct 08 2015
  • Mathematica
    CoefficientList[Series[1/((1-x)(1-x^2)(1-x^4)), {x, 0, 70}], x] (* Vincenzo Librandi, Apr 02 2014 *)
    LinearRecurrence[{1,1,-1,1,-1,-1,1},{1,1,2,2,4,4,6}, 70] (* Harvey P. Dale, Jun 03 2015 *)
    Table[Floor[((n + 1) ((-1)^n + n + 6) + 9)/16], {n, 0, 70}] (* Michael De Vlieger, Aug 14 2016 *)
  • PARI
    Vec(1/((1-x)*(1-x^2)*(1-x^4)) + O(x^70)) \\ Michel Marcus, Mar 31 2014
    
  • PARI
    vector(70, n, n--; floor(((n+1)*((-1)^n+n+6)+9)/16)) \\ Altug Alkan, Oct 08 2015
    
  • Sage
    [floor(floor(n/2+2)^2/2)/2 for n in (0..70)] # Bruno Berselli, Mar 03 2016

Formula

G.f.: 1/((1-x)*(1-x^2)*(1-x^4)).
a(n) = (2*n^2 + 14*n + 21 + (2*n + 7)*(-1)^n)/32 + ((1 + (-1)^n)/2 - (1 - (-1)^n)*i/2)*i^n/8, with i = sqrt(-1).
a(n) = floor(((n+1)*((-1)^n+n+6)+9)/16). - Tani Akinari, Jun 16 2013
a(n) = Sum_{i=1..floor((n+6)/2)} floor((n+6-2*i-(n mod 2))/4). - Wesley Ivan Hurt, Mar 31 2014
a(0)=1, a(1)=1, a(2)=2, a(3)=2, a(4)=4, a(5)=4, a(6)=6; for n>6, a(n) = a(n-1) + a(n-2) - a(n-3) + a(n-4) - a(n-5) - a(n-6) + a(n-7). - Harvey P. Dale, Jun 03 2015
a(n) = floor(floor(n/2+2)^2/4) = floor(floor(n/2+2)^2/2)/2. - Bruno Berselli, Mar 03 2016
E.g.f.: ((14 + 7*x + x^2)*cosh(x) + 2*(cos(x) + sin(x)) + (7 + 9*x + x^2)*sinh(x))/16. - Stefano Spezia, Mar 05 2023
a(n) = floor((n + 4)/4)*floor((n + 6)/4). - Ridouane Oudra, Apr 01 2023

A325691 Number of length-3 integer partitions of n whose largest part is not greater than the sum of the other two.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 2, 3, 3, 4, 4, 6, 5, 7, 7, 9, 8, 11, 10, 13, 12, 15, 14, 18, 16, 20, 19, 23, 21, 26, 24, 29, 27, 32, 30, 36, 33, 39, 37, 43, 40, 47, 44, 51, 48, 55, 52, 60, 56, 64, 61, 69, 65, 74, 70, 79, 75, 84, 80, 90, 85, 95, 91, 101, 96, 107, 102, 113
Offset: 0

Views

Author

Gus Wiseman, May 15 2019

Keywords

Comments

Also the number of possible triples of edge-lengths of a triangle with perimeter n, where degenerate (self-intersecting) triangles are allowed.
The number of triples (a,b,c) for 1 <= a <= b <= c <= a+b and a+b+c = n. - Yuchun Ji, Oct 15 2020

Examples

			The a(3) = 1 through a(12) = 6 partitions:
  (111)  (211)  (221)  (222)  (322)  (332)  (333)  (433)  (443)  (444)
                       (321)  (331)  (422)  (432)  (442)  (533)  (543)
                                     (431)  (441)  (532)  (542)  (552)
                                                   (541)  (551)  (633)
                                                                 (642)
                                                                 (651)
		

Crossrefs

Cf. A001399, A005044 (nondegenerate triangles), A008642, A069905, A124278.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n,{3}],#[[1]]<=#[[2]]+#[[3]]&]],{n,0,30}]

Formula

Conjectures from Colin Barker, May 16 2019: (Start)
G.f.: x^3*(1 + x - x^4) / ((1 - x)^3*(1 + x)^2*(1 + x^2)*(1 + x + x^2)).
a(n) = a(n-2) + a(n-3) + a(n-4) - a(n-5) - a(n-6) - a(n-7) + a(n-9) for n>8. (End)
a(n) = A005044(n+3) - A000035(n+3). i.e., remove the only one triple (a=0,b,b) if n is even from the A005044 which is the number of triples (a,b,c) for 0 <= a <= b <= c <= a+b and a+b+c = n. - Yuchun Ji, Oct 15 2020
The above conjectured formulas are true. - Stefano Spezia, May 19 2023

A325688 Number of length-3 compositions of n such that every distinct consecutive subsequence has a different sum.

Original entry on oeis.org

0, 0, 0, 1, 0, 4, 5, 12, 12, 25, 24, 40, 41, 60, 60, 85, 84, 112, 113, 144, 144, 181, 180, 220, 221, 264, 264, 313, 312, 364, 365, 420, 420, 481, 480, 544, 545, 612, 612, 685, 684, 760, 761, 840, 840, 925, 924, 1012, 1013, 1104, 1104, 1201, 1200, 1300, 1301, 1404
Offset: 0

Views

Author

Gus Wiseman, May 15 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
Confirmed recurrence relation from Colin Barker for n <= 5000. - Fausto A. C. Cariboni, Feb 13 2022

Examples

			The a(3) = 1 through a(8) = 12 compositions:
  (111)  (113)  (114)  (115)  (116)
         (122)  (132)  (124)  (125)
         (221)  (222)  (133)  (143)
         (311)  (231)  (142)  (152)
                (411)  (214)  (215)
                       (223)  (233)
                       (241)  (251)
                       (322)  (332)
                       (331)  (341)
                       (412)  (512)
                       (421)  (521)
                       (511)  (611)
		

Crossrefs

Column k = 3 of A325687.
Cf. A000217 (all length-3).

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{3}],UnsameQ@@Total/@Union[ReplaceList[#,{_,s__,_}:>{s}]]&]],{n,0,30}]

Formula

Conjectures from Colin Barker, May 16 2019: (Start)
G.f.: x^3*(1 + 2*x^2 + 4*x^3 + 5*x^4) / ((1 - x)^3*(1 + x)^2*(1 + x + x^2)).
a(n) = 2*a(n-2) + a(n-3) - a(n-4) - 2*a(n-5) + a(n-7) for n>7.
(End)

A124287 Triangle of the number of integer-sided k-gons having perimeter n, for k=3..n.

Original entry on oeis.org

1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 2, 3, 3, 1, 1, 1, 5, 4, 4, 1, 1, 3, 7, 9, 7, 4, 1, 1, 2, 9, 13, 15, 8, 5, 1, 1, 4, 13, 23, 25, 20, 10, 5, 1, 1, 3, 16, 29, 46, 37, 29, 12, 6, 1, 1, 5, 22, 48, 72, 75, 57, 35, 14, 6, 1, 1, 4, 25, 60, 113, 129, 125, 79, 47, 16, 7, 1, 1, 7, 34, 92, 172, 228, 231, 185
Offset: 3

Views

Author

T. D. Noe, Oct 24 2006

Keywords

Comments

Rotations and reversals are counted only once. For a k-gon to be nondegenerate, the longest side must be shorter than the sum of the remaining sides. Column k=3 is A005044, column k=4 is A057886, column k=5 is A124285 and column k=6 is A124286. Note that A124278 counts polygons whose sides are nondecreasing.

Examples

			For polygons having perimeter 7: 2 triangles, 3 quadrilaterals, 3 pentagons, 1 hexagon and 1 heptagon. The triangle begins
1
0 1
1 1 1
1 2 1 1
2 3 3 1 1
1 5 4 4 1 1
		

Crossrefs

Row sums are A293818.
Cf. A293819.

Programs

  • Mathematica
    Needs["DiscreteMath`Combinatorica`"]; Table[p=Partitions[n]; Table[s=Select[p,Length[ # ]==k && #[[1]]Jean-François Alcover, Jun 14 2018, after Andrew Howroyd *)
  • PARI
    T(n,k)={(sumdiv(gcd(n, k), d, eulerphi(d)*binomial(n/d, k/d))/n + binomial(k\2 + (n-k)\2, k\2) - binomial(n\2, k-1) - binomial(n\4, k\2) - if(k%2, 0, binomial((n+2)\4, k\2)))/2;}
    for(n=3, 10, for(k=3, n, print1(T(n, k), ", ")); print); \\ Andrew Howroyd, Nov 21 2017

Formula

A formula is given in Theorem 1.5 of the East and Niles article.

A325686 Number of strict length-3 compositions x + y + z = n satisfying x + y != z and x != y + z.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 2, 6, 8, 18, 16, 30, 34, 48, 48, 72, 72, 96, 98, 126, 128, 162, 160, 198, 202, 240, 240, 288, 288, 336, 338, 390, 392, 450, 448, 510, 514, 576, 576, 648, 648, 720, 722, 798, 800, 882, 880, 966, 970, 1056, 1056, 1152, 1152, 1248, 1250, 1350, 1352
Offset: 0

Views

Author

Gus Wiseman, May 13 2019

Keywords

Comments

A strict composition of n is a finite sequence of distinct positive integers summing to n.
From Kevin O'Bryant, Jun 02 2025: (Start)
Also the number of Sidon sets in {0,1,...,n} with 4 elements that contain both 0 and n.
Also, the number of 3-tuples of positive integers with the 6 numbers x, y, z, x+y, y+z, x+y+z=n all distinct. (End)

Examples

			The a(6) = 2 through a(10) = 16 compositions:
  (132)  (124)  (125)  (126)  (127)
  (231)  (142)  (143)  (135)  (136)
         (214)  (152)  (153)  (154)
         (241)  (215)  (162)  (163)
         (412)  (251)  (216)  (172)
         (421)  (341)  (234)  (217)
                (512)  (243)  (253)
                (521)  (261)  (271)
                       (315)  (316)
                       (324)  (352)
                       (342)  (361)
                       (351)  (451)
                       (423)  (613)
                       (432)  (631)
                       (513)  (712)
                       (531)  (721)
                       (612)
                       (621)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Cases[Join@@Permutations/@IntegerPartitions[n,{3}],{x_,y_,z_}/;x!=y!=z&&x+y!=z &&x!=y+z]],{n,0,30}]

Formula

Conjectures from Colin Barker, May 14 2019: (Start)
G.f.: 2*x^6*(1 + 3*x + 3*x^2 + 5*x^3) / ((1 - x)^3*(1 + x)^2*(1 + x^2)*(1 + x + x^2)).
a(n) = a(n-2) + a(n-3) + a(n-4) - a(n-5) - a(n-6) - a(n-7) + a(n-9) for n>9. (End)
Above conjecture confirmed for n <= 5000. - Fausto A. C. Cariboni, Feb 17 2022

A325689 Number of length-3 compositions of n such that no part is the sum of the other two.

Original entry on oeis.org

0, 0, 0, 1, 0, 6, 4, 15, 12, 28, 24, 45, 40, 66, 60, 91, 84, 120, 112, 153, 144, 190, 180, 231, 220, 276, 264, 325, 312, 378, 364, 435, 420, 496, 480, 561, 544, 630, 612, 703, 684, 780, 760, 861, 840, 946, 924, 1035, 1012, 1128, 1104, 1225, 1200, 1326, 1300, 1431
Offset: 0

Views

Author

Gus Wiseman, May 15 2019

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.
Confirmed recurrence relation from Colin Barker for n <= 5000. - Fausto A. C. Cariboni, Feb 15 2022

Examples

			The a(3) = 1 through a(8) = 12 compositions (empty columns not shown):
  (111)  (113)  (114)  (115)  (116)
         (122)  (141)  (124)  (125)
         (131)  (222)  (133)  (152)
         (212)  (411)  (142)  (161)
         (221)         (151)  (215)
         (311)         (214)  (233)
                       (223)  (251)
                       (232)  (323)
                       (241)  (332)
                       (313)  (512)
                       (322)  (521)
                       (331)  (611)
                       (412)
                       (421)
                       (511)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{3}],And@@Table[#[[i]]!=Total[Delete[#,i]],{i,3}]&]],{n,0,30}]

Formula

Conjectures from Colin Barker, May 16 2019: (Start)
G.f.: x^3*(1 - x + 4*x^2) / ((1 - x)^3*(1 + x)^2) for n>5.
a(n) = -(5 + 3*(-1)^n - 2*n) * (n-2) / 4 for n>0.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5).
(End)

A210249 Number of partitions of n in which all parts are less than n/2.

Original entry on oeis.org

1, 0, 0, 1, 1, 3, 4, 8, 10, 18, 23, 37, 47, 71, 90, 131, 164, 230, 288, 393, 488, 653, 807, 1060, 1303, 1686, 2063, 2637, 3210, 4057, 4920, 6158, 7434, 9228, 11098, 13671, 16380, 20040, 23928, 29098, 34624, 41869, 49668, 59755, 70667, 84626, 99795, 118991
Offset: 0

Views

Author

L. Edson Jeffery, Mar 19 2012

Keywords

Comments

Also, a(n) gives the number of partitions of 2*n in which all parts are even and less than n.
Also, number of nonpalindromic partitions of n, n >= 1. In other words: a(n) is the number of partitions of n into parts which cannot be listed in palindromic order, n >= 1. - Omar E. Pol, Jan 11 2014

Examples

			a(7) = 8, because 3+3+1 = 3+2+2 = 3+2+1+1 = 3+1+1+1+1 = 2+2+2+1 = 2+2+1+1+1 = 2+1+1+1+1+1 = 1+1+1+1+1+1+1, exhausting the partitions of the indicated class for n=7.
		

Crossrefs

Row sums of triangle A124278, for n >= 3.

Programs

  • Maple
    b:= proc(n, i) option remember;
          if n=0 then 1
        elif i<1 then 0
        else b(n, i-1) +`if`(i>n, 0, b(n-i, i))
          fi
        end:
    a:= n-> b(n, ceil(n/2)-1):
    seq (a(n), n=0..50);  # Alois P. Heinz, Mar 19 2012
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<1, 0, b[n, i-1] + If[i>n, 0, b[n-i, i]]]]; a[n_] := b[n, Ceiling[n/2]-1]; Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jan 09 2016, after Alois P. Heinz *)
    Table[Count[IntegerPartitions[n],?(Max[#]<n/2&)],{n,0,50}] (* _Harvey P. Dale, Aug 12 2025 *)

Formula

a(n) = A000041(n) - A025065(n), n >= 1. - Omar E. Pol, Jan 11 2014

Extensions

More terms from Alois P. Heinz, Mar 19 2012

A325695 Number of length-3 strict integer partitions of n such that the largest part is not the sum of the other two.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 2, 5, 5, 8, 7, 12, 11, 16, 15, 21, 20, 27, 25, 33, 32, 40, 38, 48, 46, 56, 54, 65, 63, 75, 72, 85, 83, 96, 93, 108, 105, 120, 117, 133, 130, 147, 143, 161, 158, 176, 172, 192, 188, 208, 204, 225, 221, 243, 238, 261, 257, 280, 275
Offset: 0

Views

Author

Gus Wiseman, May 15 2019

Keywords

Examples

			The a(7) = 1 through a(15) = 12 partitions (A = 10, B = 11, C = 12):
  (421)  (521)  (432)  (631)  (542)  (543)  (643)   (653)   (654)
                (531)  (721)  (632)  (732)  (652)   (842)   (753)
                (621)         (641)  (741)  (742)   (851)   (762)
                              (731)  (831)  (751)   (932)   (843)
                              (821)  (921)  (832)   (941)   (852)
                                            (841)   (A31)   (861)
                                            (931)   (B21)   (942)
                                            (A21)           (951)
                                                            (A32)
                                                            (A41)
                                                            (B31)
                                                            (C21)
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n,{3}],UnsameQ@@#&&#[[1]]!=#[[2]]+#[[3]]&]],{n,0,30}]

Formula

Conjectures from Colin Barker, May 15 2019: (Start)
G.f.: x^7*(1 + x + 2*x^2) / ((1 - x)^3*(1 + x)^2*(1 + x^2)*(1 + x + x^2)).
a(n) = a(n-2) + a(n-3) + a(n-4) - a(n-5) - a(n-6) - a(n-7) + a(n-9) for n>9.
(End)
a(n) = A325696(n)/6. - Alois P. Heinz, Jun 18 2020

A342307 Table read by ascending antidiagonals: T(n, k) is the maximum number of quasi k-gons that are not k-gons in a finite projective plane of order n, with k >= 3.

Original entry on oeis.org

126, 936, 2520, 3780, 41184, 25200, 11160, 287280, 1029600, 151200, 27090, 1294560, 12927600, 18532800, 529200, 57456, 4442760, 90619200, 439538400, 259459200, 846720, 110376, 12640320, 444276000, 4893436800, 12307075200, 2905943040, 0, 196560, 31346784, 1706443200, 34653528000, 222651374400, 295369804800, 26153487360, 0
Offset: 2

Views

Author

Stefano Spezia, Mar 08 2021

Keywords

Examples

			n\k |     3        4         5           6
----+-------------------------------------
  2 |   126     2520     25200      151200 ...
  3 |   936    41184   1029600    18532800 ...
  4 |  3780   287280  12927600   439538400 ...
  5 | 11160  1294560  90619200  4893436800 ...
...
		

Crossrefs

Programs

  • Mathematica
    T[n_,k_]:=k!Binomial[k-1,2]Binomial[n^2+n+1,k-1](n-1); Table[T[n-k+3,k],{n,2,9},{k,3,n+1}]//Flatten

Formula

T(n, k) = k!*binomial(k - 1, 2)*binomial(n^2 + n + 1, k - 1)*(n - 1).
Showing 1-9 of 9 results.