%I #15 Nov 28 2017 08:43:52
%S 0,0,0,1,3,7,14,23,36,54,75,102,136,174,220,275,335,405,486,573,672,
%T 784,903,1036,1184,1340,1512,1701,1899,2115,2350,2595,2860,3146,3443,
%U 3762,4104,4458,4836,5239,5655,6097,6566,7049,7560,8100,8655
%N Turan's upper bound on the number of triangles of a simplicial complex of dimension two for which every minimal non-face has three vertices.
%C Conjecture 1.2, p. 2 of Frohmader.
%D P. Turan, Research Problem, Kozl MTA Mat. Kutato Int. 6(1961)417-423.
%H Nathaniel Johnston, <a href="/A140462/b140462.txt">Table of n, a(n) for n = 0..10000</a>
%H Andrew Frohmader, <a href="http://arxiv.org/abs/0806.4208">More Constructions for Turan's (3, 4)-Conjecture</a>
%F a(n) = (5/2)*(k^3) - (3/2)*(k^2) if n = 3*k; (5/2)*(k^3) + (k^2) - (1/2)*k if n = 3*k+1; (5/2)*(k^3) + (7/2)*(k^2) + k if n = 3*k+2.
%F Empirical g.f.: x^3*(x^3+2*x^2+x+1) / ((x-1)^4*(x^2+x+1)^2). - _Colin Barker_, May 04 2013
%p A140462 := proc(n) local k: k:=floor(n/3): if(n mod 3 = 0)then return 5*(k^3)/2 - 3*(k^2)/2: elif(n mod 3 = 1)then return 5*(k^3)/2 + k^2 - k/2: else return 5*(k^3)/2 + 7*(k^2)/2 + k: fi: end:
%p seq(A140462(n),n=0..40); # _Nathaniel Johnston_, Apr 26 2011
%t a[n_] := Which[k = Floor[n/3]; Mod[n, 3] == 0, 5*(k^3)/2 - 3*(k^2)/2, Mod[n, 3] == 1, 5*(k^3)/2 + k^2 - k/2, True, 5*(k^3)/2 + 7*(k^2)/2 + k];
%t Table[a[n], {n, 0, 50}] (* _Jean-François Alcover_, Nov 28 2017, from Maple *)
%K easy,nonn
%O 0,5
%A _Jonathan Vos Post_, Jun 27 2008