A124072 First differences of A129819.
0, 1, 0, 2, 1, 3, 1, 4, 2, 5, 2, 6, 3, 7, 3, 8, 4, 9, 4, 10, 5, 11, 5, 12, 6, 13, 6, 14, 7, 15, 7, 16, 8, 17, 8, 18, 9, 19, 9, 20, 10, 21, 10, 22, 11, 23, 11, 24, 12, 25, 12, 26
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..5000
- Paul Curtz, Stabilite locale des systemes quadratiques, Ann. sc. Ecole Norm. Sup. vol 13 no 3 (1980) pp 293-302.
- Index entries for linear recurrences with constant coefficients, signature (0,1,0,1,0,-1).
Programs
-
Magma
R
:=PowerSeriesRing(Integers(), 61); [0] cat Coefficients(R!( x*(1+x^2+x^3)/((1-x^2)*(1-x^4)) )); // G. C. Greubel, Sep 17 2024 -
Mathematica
a[n_?OddQ] := (n+1)/2; a[n_?EvenQ] := Floor[n^2/16] - Floor[(n-2)^2/16]; Table[a[n], {n, 0, 51}] (* Jean-François Alcover, Aug 13 2012 *) LinearRecurrence[{0,1,0,1,0,-1}, {0,1,0,2,1,3}, 61] (* G. C. Greubel, Sep 17 2024 *)
-
SageMath
def A124072_list(prec): P.
= PowerSeriesRing(ZZ, prec) return P( x*(1+x^2+x^3)/((1-x^2)*(1-x^4)) ).list() A124072_list(60) # G. C. Greubel, Sep 17 2024
Formula
a(2n) = A004526(n).
a(2n+1) = A000027(n+1) .
G.f.: x*(1+x^2+x^3)/((1-x)^2*(1+x)^2*(1+x^2)). - R. J. Mathar, Feb 25 2009
From G. C. Greubel, Sep 17 2024: (Start)
a(n) = (1/8)*(3*n + 1 - (-1)^n*(n + 3) + i^n*(1 + (-1)^n)).
E.g.f.: (1/4)*( cos(x) - (1-2*x)*cosh(x) + (2+x)*sinh(x) ). (End)
Extensions
Partially edited by R. J. Mathar, Jul 07 2008
Comments