login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A123596 Squares alternating with triangular numbers. 4
0, 0, 1, 1, 4, 3, 9, 6, 16, 10, 25, 15, 36, 21, 49, 28, 64, 36, 81, 45, 100, 55, 121, 66, 144, 78, 169, 91, 196, 105, 225, 120, 256, 136, 289, 153, 324, 171, 361, 190, 400, 210, 441, 231, 484, 253, 529, 276, 576, 300, 625, 325, 676, 351, 729, 378, 784, 406, 841, 435 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,5

COMMENTS

Rearrangement of A054686.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..1000

Index entries for linear recurrences with constant coefficients, signature (0, 3, 0, -3, 0, 1).

FORMULA

a(2*n) = n^2, a(2*n+1) = (n^2+n)/2.

From R. J. Mathar, Feb 12 2010: (Start)

a(n) = 3*a(n-2) - 3*a(n-4) + a(n-6).

G.f.: x^2*(1+x+x^2)/((1-x)^3*(1+x)^3). (End)

a(n) = (3*n^2-1+(n^2+1)*(-1)^n)/16. - Luce ETIENNE, May 30 2015

MATHEMATICA

CoefficientList[Series[x^2*(1+x+x^2)/((1-x)^3*(1+x)^3)], {x, 0, 50}], x] (* or *) Table[(3*n^2-1+(n^2+1)*(-1)^n)/16, {n, 0, 50}] (* G. C. Greubel, Oct 26 2017 *)

PROG

(PARI) {a(n) = if(n%2, (n^2-1)/8, n^2/4)} \\ Michael Somos, Nov 18 2006

(MAGMA) [(3*n^2-1+(n^2+1)*(-1)^n)/16: n in [0..10]]; // G. C. Greubel, Oct 26 2017

CROSSREFS

Cf. A002620, A124093.

Sequence in context: A103825 A073238 A010655 * A309460 A200361 A222471

Adjacent sequences:  A123593 A123594 A123595 * A123597 A123598 A123599

KEYWORD

nonn

AUTHOR

Peter Hansen (babyskbaby(AT)web.de), Nov 14 2006

EXTENSIONS

Edited by Michael Somos, and several other correspondents, Nov 14 2005

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 20 11:11 EST 2020. Contains 331083 sequences. (Running on oeis4.)