login
A331952
a(n) = (-7 + (-1)^(1+n) + 6*n^2) / 8.
3
-1, 0, 2, 6, 11, 18, 26, 36, 47, 60, 74, 90, 107, 126, 146, 168, 191, 216, 242, 270, 299, 330, 362, 396, 431, 468, 506, 546, 587, 630, 674, 720, 767, 816, 866, 918, 971, 1026, 1082, 1140, 1199, 1260, 1322, 1386, 1451, 1518, 1586, 1656, 1727, 1800, 1874, 1950, 2027
OFFSET
0,3
COMMENTS
a(n+1) is once in the hexagonal spiral in A330707. a(n+2) is twice in the same spiral.
a(n) has one odd followed by three evens.
Difference table:
-1, 0, 2, 6, 11, 18, 26, 36, ... = a(n)
1, 2, 4, 5, 7, 8, 10, 11, ... = A001651(n+1)
1, 2, 1, 2, 1, 2, 1, 2, ... = A000034.
FORMULA
a(-n) = a(n).
a(20+n) - a(n) = 30*(10+n).
a(2+n) = a(n) + 3*(1+n), a(0)=-1 and a(1)=0.
a(4*n) = 12*n^2 - 1, a(1+4*n) = 6*n*(1+2*n), a(2+4*n) = 2 + 12*n*(1+n), a(3+4*n) = 6*(1+n)*(1+2*n) for n>= 0.
From Colin Barker, Feb 02 2020: (Start)
G.f.: -(1 - 2*x - 2*x^2) / ((1 - x)^3*(1 + x)).
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n>3.
a(n) = (-7 + (-1)^(1+n) + 6*n^2) / 8.
(End)
E.g.f.: (1/8)*(exp(x)*(6*x^2 + 6*x - 7) - exp(-x)). - Stefano Spezia, Feb 02 2020 after Colin Barker
a(n) = floor((n^2 - 1)*3/4). - Michael Somos, Sep 09 2023
EXAMPLE
G.f. = -1 + 2*x^2 + 6*x^3 + 11*x^4 + 18*x^5 + 26*x^6 + 36*x^7 + 47*x^8 + ... - Michael Somos, Sep 08 2023
MATHEMATICA
LinearRecurrence[{2, 0, -2, 1}, {-1, 0, 2, 6}, 100] (* Amiram Eldar, Feb 02 2020 *)
a[n_] := Floor[(n^2 - 1)*3/4]; (* Michael Somos, Sep 08 2023 *)
PROG
(Magma) a:=[-1, 0, 2, 6]; [n le 4 select a[n] else 2*Self(n-1)-2*Self(n-3)+Self(n-4): n in [1..45]]; // Marius A. Burtea, Feb 02 2020
(PARI) Vec(-(1 - 2*x - 2*x^2) / ((1 - x)^3*(1 + x)) + O(x^40)) \\ Colin Barker, Feb 03 2020
(PARI) {a(n) = (n^2 - 1)*3\4}; /* Michael Somos, Sep 08 2023 */
CROSSREFS
Equals 2 less than A084684, 1 less than A077043, and 1 more than A276382(n-1). - Greg Dresden, Feb 22 2020
Sequence in context: A298875 A329598 A248469 * A225386 A037258 A201993
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Feb 02 2020
EXTENSIONS
a(42)-a(52) from Stefano Spezia, Feb 02 2020
STATUS
approved