OFFSET
1,4
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)
LINKS
Eric Weisstein's World of Mathematics, Complete Bipartite Graph
Eric Weisstein's World of Mathematics, Projective Plane Crossing Number
Index entries for linear recurrences with constant coefficients, signature (2,-1,1,-2,1).
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
Sum_{n>=4} 1/a(n) = 10/3 - Pi/sqrt(3). - Amiram Eldar, Sep 27 2022
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 *)
PROG
(PARI) a(n)=(n-1)*(n-2)\3 \\ Charles R Greathouse IV, Jun 06 2013
CROSSREFS
A007997 counts the complement.
A337482 counts these compositions of any length.
A337484 is the non-strict/non-strict version.
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.
KEYWORD
nonn,easy
AUTHOR
Eric W. Weisstein, Mar 02 2007
STATUS
approved