A289870 a(n) = n*(n + 1) for n odd, otherwise a(n) = (n - 1)*(n + 1).
-1, 2, 3, 12, 15, 30, 35, 56, 63, 90, 99, 132, 143, 182, 195, 240, 255, 306, 323, 380, 399, 462, 483, 552, 575, 650, 675, 756, 783, 870, 899, 992, 1023, 1122, 1155, 1260, 1295, 1406, 1443, 1560, 1599, 1722, 1763, 1892, 1935, 2070, 2115, 2256, 2303, 2450, 2499
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Crossrefs
Programs
-
Mathematica
a[n_] := (n + 1)(n - 1 + Mod[n, 2]); Table[a[n], {n, 0, 50}]
-
PARI
a(n)=if(n%2, n, n-1)*(n+1) \\ Charles R Greathouse IV, Jul 14 2017
Comments