OFFSET
1,4
COMMENTS
Also the minimum number of transitive triples in a tournament on n nodes, i.e., a(n) = C(n,3) - A006918(n-2). - Leen Droogendijk, Nov 10 2014
a(n) = the number of binary strings of length n+1 with exactly one pair of adjacent 0's and exactly two pairs of adjacent 1's. - Jeremy Dover, Jul 07 2016
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
D. Garber, The Orchard crossing number of an abstract graph, arXiv:math/0303317 [math.CO], 2003.
M. Janjic and B. Petkovic, A Counting Function, arXiv 1301.4550 [math.CO], 2013.
Index entries for linear recurrences with constant coefficients, signature (2, 1, -4, 1, 2, -1).
FORMULA
a(n) = (n/16) * (2*n^2 - 8*n + 7 + (-1)^n).
G.f.: (x^5 + 2*x^4) / (1-x)^4 / (1+x)^2.
For n odd, a(n) = A060423(n). - Gerald McGarvey, Sep 14 2008
MATHEMATICA
CoefficientList[Series[(x^4 + 2 x^3) / (1 - x)^4 / (1 + x)^2, {x, 0, 40}], x] (* Vincenzo Librandi, May 17 2013 *)
Table[n/16*(2 n^2 - 8 n + 7 + (-1)^n), {n, 47}] (* Michael De Vlieger, Aug 01 2016 *)
PROG
(PARI) for(n=1, 100, print1(if(n%2, n*(n-1)*(n-3)/8, n*(n-2)^2/8)", "))
(Magma) [n/16*(2*n^2 - 8*n + 7 + (-1)^n): n in [1..50]]; // Vincenzo Librandi, May 17 2013
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Ralf Stephan, Mar 28 2003
STATUS
approved