OFFSET
0,5
COMMENTS
Apparently, also 6(n+3) times the Dedekind sum s(2,n+3). - Ralf Stephan, Sep 16 2013
LINKS
Moira Chas and Anthony Phillips, Self-intersection numbers of curves in the doubly-punctured plane , arXiv:1001.4568 [math.GT], 2010. [Jonathan Vos Post, Jan 27 2010]
Eric Weisstein's World of Mathematics, Dedekind Sum
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
G.f.: (-1 + x + 2*x^2 - x^3) / ((1 - x^2) * (1 - x)^2).
a(n) = A002620(n) - 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
EXAMPLE
G.f. = -1 - x + x^3 + 3*x^4 + 5*x^5 + 8*x^6 + 11*x^7 + 15*x^8 + 19*x^9 + ...
MAPLE
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 *)
PROG
(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 */
CROSSREFS
KEYWORD
sign,easy,nice
AUTHOR
Michael Somos, Nov 18 2002
EXTENSIONS
A-number twister corrected in cross-refs by R. J. Mathar, Feb 11 2010
STATUS
approved