A140428 a(n) = A000045(n) + A113405(n).
0, 1, 1, 3, 5, 9, 15, 27, 49, 91, 169, 317, 599, 1143, 2197, 4251, 8269, 16161, 31711, 62435, 123273, 243963, 483745, 960725, 1910503, 3803295, 7577933, 15109499, 30143973, 60166553, 120136687, 239955563, 479396897, 957961755, 1914577241
Offset: 0
Examples
a(n) and the repeated differences in the followup rows are: 0, 1, 1, 3, 5, 9, 15, ... 1, 0, 2, 2, 4, 6, 12, ... -1, 2, 0, 2, 2, 6, 10, ... 3, -2, 2, 0, 4, 4, 10, ... -5, 4, -2, 4, 0, 6, 6, ... 9, -6, 6, -4, 6, 0, 12, ... -15, 12, -10, 10, -6, -12, 0, ... The main diagonal consists of zeros.
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (3,-1,-3,3,-1,-2).
Programs
-
Magma
I:=[0,1,1,3,5,9]; [n le 6 select I[n] else 3*Self(n-1)-Self(n-2) -3*Self(n-3)+3*Self(n-4)-Self(n-5)-2*Self(n-6): n in [1..30]]; // G. C. Greubel, Jan 15 2018
-
Mathematica
CoefficientList[Series[-x (1 - 2 x - 3 x^4 + x^2)/((1 - x - x^2) (2 x - 1) (1 + x) (x^2 - x + 1)), {x, 0, 50}], x] (* G. C. Greubel, Oct 11 2017 *) LinearRecurrence[{3,-1,-3,3,-1,-2}, {0,1,1,3,5,9}, 30] (* G. C. Greubel, Jan 15 2018 *)
-
PARI
a(n)=([0,1,0,0,0,0; 0,0,1,0,0,0; 0,0,0,1,0,0; 0,0,0,0,1,0; 0,0,0,0,0,1; -2,-1,3,-3,-1,3]^n*[0;1;1;3;5;9])[1,1] \\ Charles R Greathouse IV, Oct 03 2016
Formula
O.g.f.: -x*(1-2*x-3*x^4+x^2)/((1-x-x^2)*(2*x-1)*(1+x)*(x^2-x+1)). - R. J. Mathar, Jul 10 2008
Extensions
Edited and extended by R. J. Mathar, Jul 10 2008
Comments