cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

-1, -1, 0, 1, 3, 5, 8, 11, 15, 19, 24, 29, 35, 41, 48, 55, 63, 71, 80, 89, 99, 109, 120, 131, 143, 155, 168, 181, 195, 209, 224, 239, 255, 271, 288, 305, 323, 341, 360, 379, 399, 419, 440, 461, 483, 505, 528, 551, 575, 599, 624, 649, 675, 701, 728, 755, 783, 811
Offset: 0

Views

Author

Michael Somos, Nov 18 2002

Keywords

Comments

Apparently, also 6(n+3) times the Dedekind sum s(2,n+3). - Ralf Stephan, Sep 16 2013

Examples

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

Crossrefs

Programs

  • Maple
    A078126:=n->floor((n + 2)*(n - 2)/4); seq(A078126(n), n=0..100); # Wesley Ivan Hurt, Jan 30 2014
  • Mathematica
    Table[Floor[(n + 2)(n - 2)/4], {n, 0, 100}] (* Wesley Ivan Hurt, Jan 30 2014 *)
    LinearRecurrence[{2,0,-2,1},{-1,-1,0,1},60] (* Harvey P. Dale, Sep 10 2015 *)
    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 *)
  • PARI
    a(n)=-matdet(matrix(n,n,i,j,i==j||((i+j)%2))) /* Ralf Stephan, Sep 16 2013 */
    
  • PARI
    a(n)=sumdedekind(2,n+3)*6*(n+3) /* Ralf Stephan, Sep 16 2013 */

Formula

G.f.: (-1 + x + 2*x^2 - x^3) / ((1 - x^2) * (1 - x)^2).
a(n) = A002620(n) - 1.
a(n) = A002623(n-2) - A002623(n-3) - 1.
a(n) = A024206(n-1) for all n in Z.
a(n) = floor( (n+2)(n-2)/4 ). - Wesley Ivan Hurt, Jun 16 2013
A004526(n) = a(n) - a(n-1) for all n in Z. - Michael Somos, Aug 22 2016
a(n) = Sum_{i=1..n+2} floor((n-i+1)/2). - Wesley Ivan Hurt, Sep 12 2017
E.g.f.: ((x^2 + x - 4)*cosh(x) + (x^2 + x - 5)*sinh(x))/4. - Stefano Spezia, Aug 06 2024

Extensions

A-number twister corrected in cross-refs by R. J. Mathar, Feb 11 2010