OFFSET
0,2
COMMENTS
Corresponds to the best known lower bound for the tie problem. - Jörg Zurkirchen, Oct 15 2008
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
R. Chapman et al., 2-modular lattices from ternary codes, J. Th. des Nombres de Bordeaux, 14 (2002), 73-85.
Index entries for linear recurrences with constant coefficients, signature (2,-1,1,-2,1).
FORMULA
a(n) = ceiling((n+1)*(2*n+1)/3). - Jörg Zurkirchen, Oct 15 2008
a(n) = (n+1)^2 - floor((n+1)*(n+2)/3). - Bruno Berselli, Mar 02 2017
MAPLE
seq(ceil((n+1)*(2*n+1)/3), n=0..60); # G. C. Greubel, Sep 13 2019
MATHEMATICA
CoefficientList[Series[(1+2x^2+x^3)/((1-x)^2(1-x^3)), {x, 0, 60}], x] (* or *) LinearRecurrence[{2, -1, 1, -2, 1}, {1, 2, 5, 10, 15}, 60] (* Vincenzo Librandi, Mar 31 2017 *)
PROG
(PARI) Vec((1+2*x^2+x^3)/((1-x)^2*(1-x^3)) + O(x^80)) \\ Michel Marcus, Oct 28 2015
(Magma) [Ceiling((n+1)*(2*n+1)/3): n in [0..60]]; // Vincenzo Librandi, Mar 31 2017
(Sage) [ceil((n+1)*(2*n+1)/3) for n in (0..60)] # G. C. Greubel, Sep 13 2019
(GAP) a:=[1, 2, 5, 10, 15];; for n in [6..60] do a[n]:=2*a[n-1]-a[n-2] +a[n-3]-2*a[n-4]+a[n-5]; od; a; # G. C. Greubel, Sep 13 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved