A287057 a(n) = 2*n^2 + n - (n+1) mod 2.
3, 9, 21, 35, 55, 77, 105, 135, 171, 209, 253, 299, 351, 405, 465, 527, 595, 665, 741, 819, 903, 989, 1081, 1175, 1275, 1377, 1485, 1595, 1711, 1829, 1953, 2079, 2211, 2345, 2485, 2627, 2775, 2925, 3081, 3239, 3403, 3569, 3741, 3915, 4095
Offset: 1
Keywords
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
Programs
-
Magma
[2*n^2+n-(n+1) mod 2: n in [1..60]]; // Vincenzo Librandi, Aug 12 2017
-
Maple
seq(2*n^2 + n - ((n+1) mod 2), n = 1 .. 30); # Robert Israel, Aug 11 2017
-
Mathematica
a[n_] := 2 n^2 + n - Mod[n + 1, 2]; Array[a, 50] (* Robert G. Wilson v, Aug 10 2017 *)
-
PARI
{for(n=1,100,print1(2*n^2+n-(n+1)%2", "))}
Formula
G.f.: x*(3+3*x+3*x^2-x^3)/((1+x)*(1-x)^3). - Robert Israel, Aug 11 2017
Comments