login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A325657 a(n) = (1/2)*(-1 + (-1)^n)*(n-1) + n^2. 1
0, 1, 4, 7, 16, 21, 36, 43, 64, 73, 100, 111, 144, 157, 196, 211, 256, 273, 324, 343, 400, 421, 484, 507, 576, 601, 676, 703, 784, 813, 900, 931, 1024, 1057, 1156, 1191, 1296, 1333, 1444, 1483, 1600, 1641, 1764, 1807, 1936, 1981, 2116, 2163, 2304, 2353, 2500, 2551 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
For n > 0, a(n) is the n-th element of the diagonal of the triangle A325655. Equivalently, a(n) is the element M_{n,1} of the matrix M(n) whose permanent is A322277(n).
LINKS
FORMULA
O.g.f.: (-1 - 3*x - x^2 - 3*x^3)/((-1 + x)^3*(1+x)^2).
E.g.f.: (1/2)*exp(-x)*(-1 - x + exp(2*x)*(1 + x + 2*x^2)).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 4
a(n) = n^2 if n is even.
a(n) = n^2 - n + 1 if n is odd.
MAPLE
a:=n->(1/24)*n*(3 - 3*(- 1)^n + 4*n + 6*n^2 + 8*n^3): seq(a(n), n=0..55);
MATHEMATICA
Table[(1/2)*(- 1+(-1)^n)*(n-1)+n^2, {n, 0, 55}]
PROG
(GAP) Flat(List([0..55], n->(1/2)*(- 1 + (- 1)^n)*(n - 1) + n^2));
(Magma) [(1/2)*(- 1 + (- 1)^n)*(n - 1) + n^2: n in [0..55]];
(PARI) a(n) = (1/2)*(- 1 + (- 1)^n)*(n - 1) + n^2;
CROSSREFS
Sequence in context: A110933 A299423 A067398 * A054599 A285998 A229917
KEYWORD
nonn,easy
AUTHOR
Stefano Spezia, May 13 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 03:51 EDT 2024. Contains 371264 sequences. (Running on oeis4.)