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

A007997 a(n) = ceiling((n-3)(n-4)/6).

Original entry on oeis.org

0, 0, 1, 1, 2, 4, 5, 7, 10, 12, 15, 19, 22, 26, 31, 35, 40, 46, 51, 57, 64, 70, 77, 85, 92, 100, 109, 117, 126, 136, 145, 155, 166, 176, 187, 199, 210, 222, 235, 247, 260, 274, 287, 301, 316, 330, 345, 361, 376, 392, 409, 425, 442, 460, 477, 495, 514, 532, 551, 571, 590, 610
Offset: 3

Views

Author

Keywords

Comments

Number of solutions to x+y+z=0 (mod m) with 0<=x<=y<=z
Nonorientable genus of complete graph on n nodes.
Also (with different offset) Molien series for alternating group A_3.
(1+x^3 ) / ((1-x)*(1-x^2)*(1-x^3)) is the Poincaré series [or Poincare series] (or Molien series) for H^*(S_6, F_2).
a(n+5) is the number of necklaces with 3 black beads and n white beads.
The g.f./x^5 is Z(C_3,x), the 3-variate cycle index polynomial for the cyclic group C_3, with substitution x[i]->1/(1-x^i), i=1,2,3. Therefore by Polya enumeration a(n+5) is the number of cyclically inequivalent 3-necklaces whose 3 beads are labeled with nonnegative integers such that the sum of labels is n, for n=0,1,2,... . See A102190 for Z(C_3,x). - Wolfdieter Lang, Feb 15 2005
a(n+1) is the number of pairs (x,y) with x and y in {0,...,n}, x = (y mod 3), and x+y < n. - Clark Kimberling, Jul 02 2012
From Gus Wiseman, Oct 17 2020: (Start)
Also the number of 3-part integer compositions of n - 2 that are either weakly increasing or strictly decreasing. For example, the a(5) = 1 through a(13) = 15 compositions are:
(111) (112) (113) (114) (115) (116) (117) (118) (119)
(122) (123) (124) (125) (126) (127) (128)
(222) (133) (134) (135) (136) (137)
(321) (223) (224) (144) (145) (146)
(421) (233) (225) (226) (155)
(431) (234) (235) (227)
(521) (333) (244) (236)
(432) (334) (245)
(531) (532) (335)
(621) (541) (344)
(631) (542)
(721) (632)
(641)
(731)
(821)
(End)

Examples

			For m=7 (n=12), the 12 solutions are xyz = 000 610 520 511 430 421 331 322 662 653 644 554.
		

References

  • A. Adem and R. J. Milgram, Cohomology of Finite Groups, Springer-Verlag, 2nd. ed., 2004, p. 204.
  • D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 105.
  • J. L. Gross and T. W. Tucker, Topological Graph Theory, Wiley, 1987; see \bar{I}(n) p. 221.
  • J. L. Gross and J. Yellen, eds., Handbook of Graph Theory, CRC Press, 2004; p. 740.
  • E. V. McLaughlin, Numbers of factorizations in non-unique factorial domains, Senior Thesis, Allegeny College, Meadville, PA, 2004.

Crossrefs

Apart from initial term, same as A058212.
A001399(n-6)*2 = A069905(n-3)*2 = A211540(n-1)*2 counts the strict case.
A014311 intersected with A225620 U A333256 ranks these compositions.
A218004 counts these compositions of any length.
A000009 counts strictly decreasing compositions.
A000041 counts weakly increasing compositions.
A001523 counts unimodal compositions, with complement counted by A115981.
A007318 and A097805 count compositions by length.
A032020 counts strict compositions, ranked by A233564.
A333149 counts neither increasing nor decreasing strict compositions.

Programs

  • Haskell
    a007997 n = ceiling $ (fromIntegral $ (n - 3) * (n - 4)) / 6
    a007997_list = 0 : 0 : 1 : zipWith (+) a007997_list [1..]
    -- Reinhard Zumkeller, Dec 18 2013
    
  • Maple
    x^5*(1+x^3)/((1-x)*(1-x^2)*(1-x^3));
    seq(ceil(binomial(n,2)/3), n=0..63); # Zerinvary Lajos, Jan 12 2009
    a := n -> (n*(n-7)-2*([1,1,-1][n mod 3 +1]-7))/6;
    seq(a(n), n=3..64); # Peter Luschny, Jan 13 2015
  • Mathematica
    k = 3; Table[Apply[Plus, Map[EulerPhi[ # ]Binomial[n/#, k/# ] &, Divisors[GCD[n, k]]]]/n, {n, k, 30}] (* Robert A. Russell, Sep 27 2004 *)
    Table[Ceiling[((n-3)(n-4))/6],{n,3,100}] (* or *) LinearRecurrence[ {2,-1,1,-2,1},{0,0,1,1,2},100] (* Harvey P. Dale, Jan 21 2014 *)
  • PARI
    a(n)=(n^2-7*n+16)\6 \\ Charles R Greathouse IV, Sep 24 2015

Formula

a(n) = a(n-3) + n - 2, a(0)=0, a(1)=0, a(2)=1 [Offset 0]. - Paul Barry, Jul 14 2004
G.f.: x^5*(1+x^3)/((1-x)*(1-x^2)*(1-x^3)) = x^5*(1-x+x^2)/((1-x)^2*(1-x^3)).
a(n+5) = Sum_{k=0..floor(n/2)} C(n-k,L(k/3)), where L(j/p) is the Legendre symbol of j and p. - Paul Barry, Mar 16 2006
a(3)=0, a(4)=0, a(5)=1, a(6)=1, a(7)=2, a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5). - Harvey P. Dale, Jan 21 2014
a(n) = (n^2 - 7*n + 14 - 2*(-1)^(2^(n + 1 - 3*floor((n+1)/3))))/6. - Luce ETIENNE, Dec 27 2014
a(n) = A001399(n-3) + A001399(n-6). Compare to A140106(n) = A001399(n-3) - A001399(n-6). - Gus Wiseman, Oct 17 2020
a(n) = (40 + 3*(n - 7)*n - 4*cos(2*n*Pi/3) - 4*sqrt(3)*sin(2*n*Pi/3))/18. - Stefano Spezia, Dec 14 2021
Sum_{n>=5} 1/a(n) = 6 - 2*Pi/sqrt(3) + 2*Pi*tanh(sqrt(5/3)*Pi/2)/sqrt(15). - Amiram Eldar, Oct 01 2022

A128422 Projective plane crossing number of K_{4,n}.

Original entry on oeis.org

0, 0, 0, 2, 4, 6, 10, 14, 18, 24, 30, 36, 44, 52, 60, 70, 80, 90, 102, 114, 126, 140, 154, 168, 184, 200, 216, 234, 252, 270, 290, 310, 330, 352, 374, 396, 420, 444, 468, 494, 520, 546, 574, 602, 630, 660, 690, 720, 752, 784, 816, 850, 884, 918, 954, 990, 1026
Offset: 1

Author

Eric W. Weisstein, Mar 02 2007

Keywords

Comments

From Gus Wiseman, Oct 15 2020: (Start)
Also the number of 3-part compositions of n that are neither strictly increasing nor weakly decreasing. The set of numbers k such that row k of A066099 is such a composition is the complement of A333255 (strictly increasing) and A114994 (weakly decreasing) in A014311 (triples). The a(4) = 2 through a(9) = 14 compositions are:
(1,1,2) (1,1,3) (1,1,4) (1,1,5) (1,1,6) (1,1,7)
(1,2,1) (1,2,2) (1,3,2) (1,3,3) (1,4,3) (1,4,4)
(1,3,1) (1,4,1) (1,4,2) (1,5,2) (1,5,3)
(2,1,2) (2,1,3) (1,5,1) (1,6,1) (1,6,2)
(2,3,1) (2,1,4) (2,1,5) (1,7,1)
(3,1,2) (2,2,3) (2,2,4) (2,1,6)
(2,3,2) (2,3,3) (2,2,5)
(2,4,1) (2,4,2) (2,4,3)
(3,1,3) (2,5,1) (2,5,2)
(4,1,2) (3,1,4) (2,6,1)
(3,2,3) (3,1,5)
(3,4,1) (3,2,4)
(4,1,3) (3,4,2)
(5,1,2) (3,5,1)
(4,1,4)
(4,2,3)
(5,1,3)
(6,1,2)
(End)

Crossrefs

A007997 counts the complement.
A337482 counts these compositions of any length.
A337484 is the non-strict/non-strict version.
A000009 counts strictly increasing compositions, ranked by A333255.
A000041 counts weakly decreasing compositions, ranked by A114994.
A001523 counts unimodal compositions (strict: A072706).
A007318 and A097805 count compositions by length.
A032020 counts strict compositions, ranked by A233564.
A225620 ranks weakly increasing compositions.
A333149 counts neither increasing nor decreasing strict compositions.
A333256 ranks strictly decreasing compositions.
A337483 counts 3-part weakly increasing or weakly decreasing compositions.

Programs

  • Mathematica
    Table[Floor[((n - 2)^2 + (n - 2))/3], {n, 1, 100}] (* Vladimir Joseph Stephan Orlovsky, Jan 31 2012 *)
    Table[Ceiling[n^2/3] - n, {n, 20}] (* Eric W. Weisstein, Sep 07 2018 *)
    Table[(3 n^2 - 9 n + 4 - 4 Cos[2 n Pi/3])/9, {n, 20}] (* Eric W. Weisstein, Sep 07 2018 *)
    LinearRecurrence[{2, -1, 1, -2, 1}, {0, 0, 0, 2, 4, 6}, 20] (* Eric W. Weisstein, Sep 07 2018 *)
    CoefficientList[Series[-2 x^3/((-1 + x)^3 (1 + x + x^2)), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 07 2018 *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n,{3}],!Less@@#&&!GreaterEqual@@#&]],{n,15}] (* Gus Wiseman, Oct 15 2020 *)
  • PARI
    a(n)=(n-1)*(n-2)\3 \\ Charles R Greathouse IV, Jun 06 2013

Formula

a(n) = floor(n/3)*(2n-3(floor(n/3)+1)).
a(n) = ceiling(n^2/3) - n. - Charles R Greathouse IV, Jun 06 2013
G.f.: -2*x^4 / ((x-1)^3*(x^2+x+1)). - Colin Barker, Jun 06 2013
a(n) = floor((n - 1)(n - 2) / 3). - Christopher Hunt Gribble, Oct 13 2009
a(n) = 2*A001840(n-3). - R. J. Mathar, Jul 21 2015
a(n) = A000217(n-2) - A001399(n-6) - A001399(n-3). - Gus Wiseman, Oct 15 2020
Sum_{n>=4} 1/a(n) = 10/3 - Pi/sqrt(3). - Amiram Eldar, Sep 27 2022

A218004 Number of equivalence classes of compositions of n where two compositions a,b are considered equivalent if the summands of a can be permuted into the summands of b with an even number of transpositions.

Original entry on oeis.org

1, 1, 2, 4, 6, 9, 14, 19, 27, 37, 51, 67, 91, 118, 156, 202, 262, 334, 430, 543, 690, 867, 1090, 1358, 1696, 2099, 2600, 3201, 3939, 4820, 5899, 7181, 8738, 10590, 12821, 15467, 18644, 22396, 26878, 32166, 38450, 45842, 54599, 64870, 76990, 91181, 107861, 127343, 150182, 176788, 207883
Offset: 0

Author

Geoffrey Critzer, Oct 17 2012

Keywords

Comments

a(n) = A000041(n) + A000009(n) - 1 where A000041 is the partition numbers and A000009 is the number of partitions into distinct parts.
From Gus Wiseman, Oct 14 2020: (Start)
Also the number of compositions of n that are either strictly increasing or weakly decreasing. For example, the a(1) = 1 through a(6) = 14 compositions are:
(1) (2) (3) (4) (5) (6)
(11) (12) (13) (14) (15)
(21) (22) (23) (24)
(111) (31) (32) (33)
(211) (41) (42)
(1111) (221) (51)
(311) (123)
(2111) (222)
(11111) (321)
(411)
(2211)
(3111)
(21111)
(111111)
A007997 counts only compositions of length 3.
A329398 appears to be the weakly increasing version.
A333147 is the strictly decreasing version.
A333255 union A114994 ranks these compositions using standard compositions (A066099).
A337482 counts the complement.
(End)

Examples

			a(4) = 6 because the 6 classes can be represented by: 4, 3+1, 1+3, 2+2, 2+1+1, 1+1+1+1.
		

Crossrefs

A000009 counts strictly increasing compositions, ranked by A333255.
A000041 counts weakly decreasing compositions, ranked by A114994.
A001523 counts unimodal compositions (strict: A072706).
A007318 and A097805 count compositions by length.
A032020 counts strict compositions, ranked by A233564.
A332834 counts compositions not increasing nor decreasing (strict: A333149).

Programs

  • Mathematica
    nn=50;p=CoefficientList[Series[Product[1/(1-x^i),{i,1,nn}],{x,0,nn}],x];d= CoefficientList[Series[Sum[Product[x^i/(1-x^i),{i,1,k}],{k,0,nn}],{x,0,nn}],x];p+d-1
    (* second program *)
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Less@@#||GreaterEqual@@#&]],{n,0,15}] (* Gus Wiseman, Oct 14 2020 *)

A333147 Number of compositions of n that are either strictly increasing or strictly decreasing.

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 7, 9, 11, 15, 19, 23, 29, 35, 43, 53, 63, 75, 91, 107, 127, 151, 177, 207, 243, 283, 329, 383, 443, 511, 591, 679, 779, 895, 1023, 1169, 1335, 1519, 1727, 1963, 2225, 2519, 2851, 3219, 3631, 4095, 4607, 5179, 5819, 6527, 7315, 8193, 9163
Offset: 0

Author

Gus Wiseman, May 16 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.

Examples

			The a(1) = 1 through a(9) = 15 compositions:
  (1)  (2)  (3)    (4)    (5)    (6)      (7)      (8)      (9)
            (1,2)  (1,3)  (1,4)  (1,5)    (1,6)    (1,7)    (1,8)
            (2,1)  (3,1)  (2,3)  (2,4)    (2,5)    (2,6)    (2,7)
                          (3,2)  (4,2)    (3,4)    (3,5)    (3,6)
                          (4,1)  (5,1)    (4,3)    (5,3)    (4,5)
                                 (1,2,3)  (5,2)    (6,2)    (5,4)
                                 (3,2,1)  (6,1)    (7,1)    (6,3)
                                          (1,2,4)  (1,2,5)  (7,2)
                                          (4,2,1)  (1,3,4)  (8,1)
                                                   (4,3,1)  (1,2,6)
                                                   (5,2,1)  (1,3,5)
                                                            (2,3,4)
                                                            (4,3,2)
                                                            (5,3,1)
                                                            (6,2,1)
		

Crossrefs

Strict partitions are A000009.
Unimodal compositions are A001523 (strict: A072706).
Strict compositions are A032020.
The non-strict version appears to be A329398.
Partitions with incr. or decr. run-lengths are A332745 (strict: A333190).
Compositions with incr. or decr. run-lengths are A332835 (strict: A333191).
The complement is counted by A333149 (non-strict: A332834).

Programs

  • Mathematica
    Table[2*PartitionsQ[n]-1,{n,0,30}]

Formula

a(n) = 2*A000009(n) - 1.

A333191 Number of compositions of n whose run-lengths are either strictly increasing or strictly decreasing.

Original entry on oeis.org

1, 1, 2, 2, 5, 8, 10, 18, 24, 29, 44, 60, 68, 100, 130, 148, 201, 256, 310, 396, 478, 582, 736, 898, 1068, 1301, 1594, 1902, 2288, 2750, 3262, 3910, 4638, 5510, 6538, 7686, 9069, 10670, 12560, 14728, 17170, 20090, 23462, 27292, 31710, 36878, 42704, 49430
Offset: 0

Author

Gus Wiseman, May 17 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.

Examples

			The a(1) = 1 through a(7) = 18 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)
       (11)  (111)  (22)    (113)    (33)      (115)
                    (112)   (122)    (114)     (133)
                    (211)   (221)    (222)     (223)
                    (1111)  (311)    (411)     (322)
                            (1112)   (1113)    (331)
                            (2111)   (3111)    (511)
                            (11111)  (11112)   (1114)
                                     (21111)   (1222)
                                     (111111)  (2221)
                                               (4111)
                                               (11113)
                                               (11122)
                                               (22111)
                                               (31111)
                                               (111112)
                                               (211111)
                                               (1111111)
		

Crossrefs

The non-strict version is A332835.
The case of partitions is A333190.
Unimodal compositions are A001523.
Strict compositions are A032020.
Partitions with distinct run-lengths are A098859.
Partitions with strictly increasing run-lengths are A100471.
Partitions with strictly decreasing run-lengths are A100881.
Partitions with weakly decreasing run-lengths are A100882.
Partitions with weakly increasing run-lengths are A100883.
Compositions with equal run-lengths are A329738.
Compositions whose run-lengths are unimodal are A332726.
Compositions whose run-lengths are unimodal or co-unimodal are A332746.
Compositions whose run-lengths are neither incr. nor decr. are A332833.
Compositions that are neither increasing nor decreasing are A332834.
Compositions with weakly increasing run-lengths are A332836.
Compositions that are strictly incr. or strictly decr. are A333147.
Compositions with strictly increasing run-lengths are A333192.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Or[Less@@Length/@Split[#],Greater@@Length/@Split[#]]&]],{n,0,15}]

Formula

a(n > 0) = 2*A333192(n) - A000005(n).

Extensions

Terms a(26) and beyond from Giovanni Resta, May 19 2020

A333190 Number of integer partitions of n whose run-lengths are either strictly increasing or strictly decreasing.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 7, 10, 13, 15, 21, 26, 29, 39, 49, 50, 68, 80, 92, 109, 129, 142, 181, 201, 227, 262, 317, 343, 404, 456, 516, 589, 677, 742, 870, 949, 1077, 1207, 1385, 1510, 1704, 1895, 2123, 2352, 2649, 2877, 3261, 3571, 3966, 4363, 4873, 5300, 5914, 6466
Offset: 0

Author

Gus Wiseman, May 17 2020

Keywords

Examples

			The a(1) = 1 through a(8) = 13 partitions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (221)    (33)      (322)      (44)
                    (211)   (311)    (222)     (331)      (332)
                    (1111)  (2111)   (411)     (511)      (422)
                            (11111)  (3111)    (2221)     (611)
                                     (21111)   (4111)     (2222)
                                     (111111)  (22111)    (5111)
                                               (31111)    (22211)
                                               (211111)   (41111)
                                               (1111111)  (221111)
                                                          (311111)
                                                          (2111111)
                                                          (11111111)
		

Crossrefs

The non-strict version is A332745.
The generalization to compositions is A333191.
Partitions with distinct run-lengths are A098859.
Partitions with strictly increasing run-lengths are A100471.
Partitions with strictly decreasing run-lengths are A100881.
Partitions with weakly decreasing run-lengths are A100882.
Partitions with weakly increasing run-lengths are A100883.
Partitions with unimodal run-lengths are A332280.
Partitions whose run-lengths are not increasing nor decreasing are A332641.
Compositions whose run-lengths are unimodal or co-unimodal are A332746.
Compositions that are neither increasing nor decreasing are A332834.
Strictly increasing or strictly decreasing compositions are A333147.
Compositions with strictly increasing run-lengths are A333192.
Numbers with strictly increasing prime multiplicities are A334965.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],Or[Less@@Length/@Split[#],Greater@@Length/@Split[#]]&]],{n,0,30}]

A333192 Number of compositions of n with strictly increasing run-lengths.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 7, 10, 14, 16, 24, 31, 37, 51, 67, 76, 103, 129, 158, 199, 242, 293, 370, 450, 538, 652, 799, 953, 1147, 1376, 1635, 1956, 2322, 2757, 3271, 3845, 4539, 5336, 6282, 7366, 8589, 10046, 11735, 13647, 15858, 18442, 21354, 24716, 28630, 32985
Offset: 0

Author

Gus Wiseman, May 17 2020

Keywords

Comments

A composition of n is a finite sequence of positive integers summing to n.

Examples

			The a(1) = 1 through a(8) = 14 compositions:
  (1)  (2)   (3)    (4)     (5)      (6)       (7)        (8)
       (11)  (111)  (22)    (122)    (33)      (133)      (44)
                    (211)   (311)    (222)     (322)      (233)
                    (1111)  (2111)   (411)     (511)      (422)
                            (11111)  (3111)    (1222)     (611)
                                     (21111)   (4111)     (2222)
                                     (111111)  (22111)    (5111)
                                               (31111)    (11222)
                                               (211111)   (41111)
                                               (1111111)  (122111)
                                                          (221111)
                                                          (311111)
                                                          (2111111)
                                                          (11111111)
For example, the composition (1,2,2,1,1,1) has run-lengths (1,2,3), so is counted under a(8).
		

Crossrefs

The case of partitions is A100471.
The non-strict version is A332836.
Strictly increasing compositions are A000009.
Unimodal compositions are A001523.
Strict compositions are A032020.
Partitions with strictly increasing run-lengths are A100471.
Partitions with strictly decreasing run-lengths are A100881.
Compositions with equal run-lengths are A329738.
Compositions whose run-lengths are unimodal are A332726.
Compositions with strictly increasing or decreasing run-lengths are A333191.
Numbers with strictly increasing prime multiplicities are A334965.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],Less@@Length/@Split[#]&]],{n,0,15}]
    b[n_, lst_, v_] := b[n, lst, v] = If[n == 0, 1, If[n <= lst, 0, Sum[If[k == v, 0, b[n - k pz, pz, k]], {pz, lst + 1, n}, {k, Floor[n/pz]}]]]; a[n_] := b[n, 0, 0]; a /@ Range[0, 50] (* Giovanni Resta, May 18 2020 *)

Extensions

Terms a(26) and beyond from Giovanni Resta, May 18 2020
Showing 1-7 of 7 results.