%I M2439 N0966 #232 Dec 02 2022 07:04:12
%S 0,0,1,3,5,8,12,16,21,27,33,40,48,56,65,75,85,96,108,120,133,147,161,
%T 176,192,208,225,243,261,280,300,320,341,363,385,408,432,456,481,507,
%U 533,560,588,616,645,675,705,736,768,800,833,867,901,936
%N a(n) = floor(n^2/3).
%C Let M_n be the n X n matrix of the following form: [3 2 1 0 0 0 0 0 0 0 / 2 3 2 1 0 0 0 0 0 0 / 1 2 3 2 1 0 0 0 0 0 / 0 1 2 3 2 1 0 0 0 0 / 0 0 1 2 3 2 1 0 0 0 / 0 0 0 1 2 3 2 1 0 0 / 0 0 0 0 1 2 3 2 1 0 / 0 0 0 0 0 1 2 3 2 1 / 0 0 0 0 0 0 1 2 3 2 / 0 0 0 0 0 0 0 1 2 3]. Then for n > 2 a(n) = det M_(n-2). - _Benoit Cloitre_, Jun 20 2002
%C Largest possible size for the directed Cayley graph on two generators having diameter n - 2. - _Ralf Stephan_, Apr 27 2003
%C It seems that for n >= 2, a(n) is the maximum number of non-overlapping 1 X 3 rectangles that can be packed into an n X n square. Rectangles can only be placed parallel to the sides of the square. Verified with Lobato's tool, see links. - _Dmitry Kamenetsky_, Aug 03 2009
%C Maximum number of edges in a K4-free graph with n vertices. - _Yi Yang_, May 23 2012
%C 3a(n) + 1 = y^2 if n is not 0 mod 3 and 3a(n) = y^2 otherwise. - _Jon Perry_, Sep 10 2012
%C Apart from the initial term this is the elliptic troublemaker sequence R_n(1, 3) (also sequence R_n(2, 3)) in the notation of Stange (see Table 1, p. 16). For other elliptic troublemaker sequences R_n(a, b) see the cross references below. - _Peter Bala_, Aug 08 2013
%C The number of partitions of 2n into exactly 3 parts. - _Colin Barker_, Mar 22 2015
%C a(n-1) is the maximum number of non-overlapping triples (i,k), (i+1, k+1), (i+2, k+2) in an n X n matrix. Details: The triples are distributed along the main diagonal and 2*(n-1) other diagonals. Their maximum number is floor(n/3) + 2*Sum_{k = 1..n-1} floor(k/3) = floor((n-1)^2/3). - _Gerhard Kirchner_, Feb 04 2017
%C Conjecture: a(n) is the number of intersection points of n сevians that cut a triangle into the maximum number of pieces (see A007980). - _Anton Zakharov_, May 07 2017
%C From _Gus Wiseman_, Oct 05 2020: (Start)
%C Also the number of unimodal triples (meaning the middle part is not strictly less than both of the other two) of positive integers summing to n + 1. The a(2) = 1 through a(6) = 12 triples are:
%C (1,1,1) (1,1,2) (1,1,3) (1,1,4) (1,1,5)
%C (1,2,1) (1,2,2) (1,2,3) (1,2,4)
%C (2,1,1) (1,3,1) (1,3,2) (1,3,3)
%C (2,2,1) (1,4,1) (1,4,2)
%C (3,1,1) (2,2,2) (1,5,1)
%C (2,3,1) (2,2,3)
%C (3,2,1) (2,3,2)
%C (4,1,1) (2,4,1)
%C (3,2,2)
%C (3,3,1)
%C (4,2,1)
%C (5,1,1)
%C (End)
%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Vincenzo Librandi, <a href="/A000212/b000212.txt">Table of n, a(n) for n = 0..5000</a>
%H Kevin Beanland, Hung Viet Chu, and Carrie E. Finch-Smith, <a href="https://arxiv.org/abs/2112.14905">Generalized Schreier sets, linear recurrence relation, Turán graphs</a>, arXiv:2112.14905 [math.CO], 2021.
%H Rafael Durbano Lobato, <a href="http://web.archive.org/web/20170506215609/http://lagrange.ime.usp.br/~lobato/packing/index.php#comb_alg">Recursive partitioning approach for the Manufacturer's Pallet Loading Problem</a>.
%H Bakir Farhi, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL16/Farhi/farhi7.html">On the Representation of the Natural Numbers as the Sum of Three Terms of the Sequence floor(n^2/a)</a>, Journal of Integer Sequences, Vol. 16 (2013), Article 13.6.4.
%H Bakir Farhi, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL17/Farhi/farhi12.html">An Elementary Proof that any Natural Number can be Written as the Sum of Three Terms of the Sequence floor(n^2/3)</a>, Journal of Integer Sequences, Vol. 17 (2014), Article 14.7.6.
%H Simon Plouffe, <a href="https://arxiv.org/abs/0911.4975">Approximations de séries génératrices et quelques conjectures</a>, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
%H Simon Plouffe, <a href="/A000051/a000051_2.pdf">1031 Generating Functions</a>, Appendix to Thesis, Montreal, 1992.
%H Katherine E. Stange, <a href="http://arxiv.org/abs/1108.3051">Integral points on elliptic curves and explicit valuations of division polynomials</a> arXiv:1108.3051v3 [math.NT], 2011-2014.
%H C. K. Wong and Don Coppersmith, <a href="https://doi.org/10.1145/321832.321838">A combinatorial problem related to multimodule memory organizations</a>, J. ACM 21 (1974), 392-402.
%H Anton Zakharov, <a href="/A000212/a000212.jpg">Cevians</a>.
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1,1,-2,1).
%F G.f.: x^2*(1+x)/((1-x)^2*(1-x^3)). - _Franklin T. Adams-Watters_, Apr 01 2002
%F Euler transform of length 3 sequence [ 3, -1, 1]. - _Michael Somos_, Sep 25 2006
%F G.f.: x^2 * (1 - x^2) / ((1 - x)^3 * (1 - x^3)). a(-n) = a(n). - _Michael Somos_, Sep 25 2006
%F a(n) = Sum_{k = 0..n} A011655(k)*(n-k). - _Reinhard Zumkeller_, Nov 30 2009
%F a(n) = a(n-1) + a(n-3) - a(n-4) + 2 for n >= 4. - _Alexander Burstein_, Nov 20 2011
%F a(n) = a(n-3) + A005408(n-2) for n >= 3. - _Alexander Burstein_, Feb 15 2013
%F a(n) = (n-1)^2 - a(n-1) - a(n-2) for n >= 2. - _Richard R. Forberg_, Jun 05 2013
%F Sum_{n >= 2} 1/a(n) = (27 + 6*sqrt(3)*Pi + 2*Pi^2)/36. - _Enrique Pérez Herrero_, Jun 29 2013
%F 0 = a(n)*(a(n+2) + a(n+3)) + a(n+1)*(-2*a(n+2) - a(n+3) + a(n+4)) + a(n+2)*(a(n+2) - 2*a(n+3) + a(n+4)) for all n in Z. - _Michael Somos_, Jan 22 2014
%F a(n) = Sum_{k = 1..n} k^2*A049347(n+2-k). - _Mircea Merca_, Feb 04 2014
%F a(n) = Sum_{i = 1..n+1} (ceiling(i/3) + floor(i/3) - 1). - _Wesley Ivan Hurt_, Jun 06 2014
%F a(n) = Sum_{j = 1..n} Sum_{i=1..n} ceiling((i+j-n-1)/3). - _Wesley Ivan Hurt_, Mar 12 2015
%F a(n) = Sum_{i = 1..n} floor(2*i/3). - _Wesley Ivan Hurt_, May 22 2017
%F a(-n) = a(n). - _Paul Curtz_, Jan 19 2020
%F a(n) = A001399(2*n - 3). - _Gus Wiseman_, Oct 07 2020
%F a(n) = (1/6)*(2*n^2 - 3 + gcd(n,3)). - _Ridouane Oudra_, Apr 15 2021
%F E.g.f.: (exp(x)*(-2 + 3*x*(1 + x)) + 2*exp(-x/2)*cos(sqrt(3)*x/2))/9. - _Stefano Spezia_, Oct 24 2022
%F Sum_{n>=2} (-1)^n/a(n) = Pi/sqrt(3) - Pi^2/36 - 3/4. - _Amiram Eldar_, Dec 02 2022
%e G.f. = x^2 + 3*x^3 + 5*x^4 + 8*x^5 + 12*x^6 + 16*x^7 + 21*x^8 + 27*x^9 + 33*x^10 + ...
%e From _Gus Wiseman_, Oct 07 2020: (Start)
%e The a(2) = 1 through a(6) = 12 partitions of 2*n into exactly 3 parts (Barker) are the following. The Heinz numbers of these partitions are given by the intersection of A014612 (triples) and A300061 (even sum).
%e (2,1,1) (2,2,2) (3,3,2) (4,3,3) (4,4,4)
%e (3,2,1) (4,2,2) (4,4,2) (5,4,3)
%e (4,1,1) (4,3,1) (5,3,2) (5,5,2)
%e (5,2,1) (5,4,1) (6,3,3)
%e (6,1,1) (6,2,2) (6,4,2)
%e (6,3,1) (6,5,1)
%e (7,2,1) (7,3,2)
%e (8,1,1) (7,4,1)
%e (8,2,2)
%e (8,3,1)
%e (9,2,1)
%e (10,1,1)
%e (End)
%p A000212:=(-1+z-2*z**2+z**3-2*z**4+z**5)/(z**2+z+1)/(z-1)**3; # Conjectured by _Simon Plouffe_ in his 1992 dissertation. Gives sequence with an additional leading 1.
%p A000212 := proc(n) option remember; `if`(n<4, [0,0,1,3][n+1], a(n-1)+a(n-3) -a(n-4)+2) end; # _Peter Luschny_, Nov 20 2011
%t Table[Quotient[n^2, 3], {n, 0, 59}] (* _Michael Somos_, Jan 22 2014 *)
%o (PARI) {a(n) = n^2 \ 3}; /* _Michael Somos_, Sep 25 2006 */
%o (Magma) [Floor(n^2 / 3): n in [0..50]]; // _Vincenzo Librandi_, May 08 2011
%o (Python)
%o def A000212(n): return n**2//3 # _Chai Wah Wu_, Jun 07 2022
%Y Cf. A000290, A007590 (= R_n(2,4)), A002620 (= R_n(1,2)), A118015, A056827, A118013.
%Y Cf. A033436 (= R_n(1,4) = R_n(3,4)), A033437 (= R_n(1,5) = R_n(4,5)), A033438 (= R_n(1,6) = R_n(5,6)), A033439 (= R_n(1,7) = R_n(6,7)), A033440, A033441, A033442, A033443, A033444.
%Y Cf. A001353 and A004523 (first differences). A184535 (= R_n(2,5) = R_n(3,5)).
%Y Cf. A238738. - _Bruno Berselli_, Apr 17 2015
%Y Cf. A007980
%Y Cf. A005408.
%Y A000217(n-2) counts 3-part compositions.
%Y A014612 ranks 3-part partitions, with strict case A007304.
%Y A069905 counts the 3-part partitions.
%Y A211540 counts strict 3-part partitions.
%Y A337453 ranks strict 3-part compositions.
%Y Cf. A056834, A130519, A056838, A056865.
%Y A001399(n-6)*4 is the strict version.
%Y A001523 counts unimodal compositions, with strict case A072706.
%Y A001840(n-4) is the non-unimodal version.
%Y A001399(n-6)*2 is the strict non-unimodal version.
%Y A007052 counts unimodal patterns.
%Y A115981 counts non-unimodal compositions, ranked by A335373.
%Y A011782 counts unimodal permutations.
%Y A335373 is the complement of a ranking sequence for unimodal compositions.
%Y A337459 ranks these compositions, with complement A337460.
%Y Cf. A069905, A220377, A332743, A337461, A337561, A337603, A337604.
%K nonn,easy
%O 0,4
%A _N. J. A. Sloane_
%E Edited by _Charles R Greathouse IV_, Apr 19 2010