%I #66 Sep 08 2022 08:46:02
%S 0,0,0,2,6,14,26,44,68,100,140,190,250,322,406,504,616,744,888,1050,
%T 1230,1430,1650,1892,2156,2444,2756,3094,3458,3850,4270,4720,5200,
%U 5712,6256,6834,7446,8094,8778,9500,10260,11060,11900,12782,13706
%N Number of (w,x,y) with all terms in {0,...,n} and |w-x| < |x-y| < |y-w|.
%C For a guide to related sequences, see A212959.
%C Magic numbers of nucleons in a biaxially deformed nucleus at oscillator ratio 1:2 (oblate ellipsoid) under the simple harmonic oscillator model. - _Jess Tauber_, May 14 2013
%C a(n) is the number of Sidon subsets of {1,...,n+1} of size 3. - _Carl Najafi_, Apr 27 2014
%H Vincenzo Librandi, <a href="/A212964/b212964.txt">Table of n, a(n) for n = 0..1000</a>
%H Jean-Luc Baril, Alexander Burstein, and Sergey Kirgizov, <a href="https://arxiv.org/abs/2010.06270">Pattern statistics in faro words and permutations</a>, arXiv:2010.06270 [math.CO], 2020.
%H Ikuko Hamamoto, <a href="http://ribf.riken.jp/~seminar/Lecture/hamamoto/hamamoto100622/riken-lec-june10-pdf.pdf">One-particle motion in nuclear many-body problem</a>, Division of Mathematical Physics, LTH, University of Lund, Sweden.
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (3,-2,-2,3,-1).
%F a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5).
%F G.f.: f(x)/g(x), where f(x)=2*x^3 and g(x)=(1+x)(1-x)^4.
%F a(n+3) = 2*A002623(n).
%F a(n) = Sum_{k=0..n} floor((k-1)^2/2). - _Enrique PĂ©rez Herrero_, Dec 28 2013
%F a(n) = Sum_{i=1..n} floor(i^2/2) - 2*floor(i/2). - _Wesley Ivan Hurt_, Jul 23 2014
%F a(n) = (2*n-1)*(2*n^2-2*n-3)/24 - (-1)^n/8. - _Robert Israel_, Jul 23 2014
%F E.g.f.: (x*(2*x^2 + 3*x - 3)*cosh(x) + (2*x^3 + 3*x^2 - 3*x + 3)*sinh(x))/12. - _Stefano Spezia_, Jul 06 2021
%p A212964:=n->add(floor(i^2/2) - 2*floor(i/2), i=1..n): seq(A212964(n), n=0..50); # _Wesley Ivan Hurt_, Jul 23 2014
%t t = Compile[{{n, _Integer}}, Module[{s = 0},
%t (Do[If[Abs[w - x] < Abs[x - y] < Abs[y - w], s = s + 1],
%t {w, 0, n}, {x, 0, n}, {y, 0, n}]; s)]];
%t m = Map[t[#] &, Range[0, 45]] (* A212964 *)
%t m/2 (* essentially A002623 *)
%t CoefficientList[Series[2 x^3/((1 + x) (1 - x)^4), {x, 0, 50}], x] (* _Vincenzo Librandi_, Jul 25 2014 *)
%o (Magma) [(2*n-1)*(2*n^2-2*n-3)/24 - (-1)^n/8: n in [0..50]]; // _Vincenzo Librandi_, Jul 25 2014
%o (PARI) a(n) = (2*n-1)*(2*n^2-2*n-3)/24 - (-1)^n/8;
%o vector (100, n, a(n-1)) \\ _Altug Alkan_, Sep 30 2015
%Y Cf. A002623, A212959, A334187.
%Y First differences: A007590, is first differences of 2*A001752(n-4) for n > 3; partial sums: 2*A001752(n-3) for n > 2, is partial sums of A007590(n-1) for n > 0. - _Guenther Schrack_, Mar 19 2018
%K nonn,easy
%O 0,4
%A _Clark Kimberling_, Jun 02 2012