login
Negative determinant of n X n matrix M_{i,j}=1 if i=j or i+j=1 (mod 2).
4

%I #41 Aug 06 2024 14:47:53

%S -1,-1,0,1,3,5,8,11,15,19,24,29,35,41,48,55,63,71,80,89,99,109,120,

%T 131,143,155,168,181,195,209,224,239,255,271,288,305,323,341,360,379,

%U 399,419,440,461,483,505,528,551,575,599,624,649,675,701,728,755,783,811

%N Negative determinant of n X n matrix M_{i,j}=1 if i=j or i+j=1 (mod 2).

%C Apparently, also 6(n+3) times the Dedekind sum s(2,n+3). - _Ralf Stephan_, Sep 16 2013

%H Moira Chas and Anthony Phillips, <a href="https://arxiv.org/abs/1001.4568">Self-intersection numbers of curves in the doubly-punctured plane </a>, arXiv:1001.4568 [math.GT], 2010. [_Jonathan Vos Post_, Jan 27 2010]

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DedekindSum.html">Dedekind Sum</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-2,1).

%F G.f.: (-1 + x + 2*x^2 - x^3) / ((1 - x^2) * (1 - x)^2).

%F a(n) = A002620(n) - 1.

%F a(n) = A002623(n-2) - A002623(n-3) - 1.

%F a(n) = A024206(n-1) for all n in Z.

%F a(n) = floor( (n+2)(n-2)/4 ). - _Wesley Ivan Hurt_, Jun 16 2013

%F A004526(n) = a(n) - a(n-1) for all n in Z. - _Michael Somos_, Aug 22 2016

%F a(n) = Sum_{i=1..n+2} floor((n-i+1)/2). - _Wesley Ivan Hurt_, Sep 12 2017

%F E.g.f.: ((x^2 + x - 4)*cosh(x) + (x^2 + x - 5)*sinh(x))/4. - _Stefano Spezia_, Aug 06 2024

%e G.f. = -1 - x + x^3 + 3*x^4 + 5*x^5 + 8*x^6 + 11*x^7 + 15*x^8 + 19*x^9 + ...

%p A078126:=n->floor((n + 2)*(n - 2)/4); seq(A078126(n), n=0..100); # _Wesley Ivan Hurt_, Jan 30 2014

%t Table[Floor[(n + 2)(n - 2)/4], {n, 0, 100}] (* _Wesley Ivan Hurt_, Jan 30 2014 *)

%t LinearRecurrence[{2,0,-2,1},{-1,-1,0,1},60] (* _Harvey P. Dale_, Sep 10 2015 *)

%t a[n_]:=-Det[Table[If[i==j ||Mod[i+j,2]==1,1,0],{i,n},{j,n}]]; Join[{-1},Array[a,57]] (* _Stefano Spezia_, Aug 06 2024 *)

%o (PARI) a(n)=-matdet(matrix(n,n,i,j,i==j||((i+j)%2))) /* _Ralf Stephan_, Sep 16 2013 */

%o (PARI) a(n)=sumdedekind(2,n+3)*6*(n+3) /* _Ralf Stephan_, Sep 16 2013 */

%Y Cf. A002620, A002623, A004526, A024206.

%K sign,easy,nice

%O 0,5

%A _Michael Somos_, Nov 18 2002

%E A-number twister corrected in cross-refs by _R. J. Mathar_, Feb 11 2010