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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A014112 a(n) = n*(n-1) + (n-2)*(n-3) + ... + 1*0 + 1 for n odd; otherwise, a(n) = n*(n-1) + (n-2)*(n-3) + ... + 2*1. 1
1, 2, 7, 14, 27, 44, 69, 100, 141, 190, 251, 322, 407, 504, 617, 744, 889, 1050, 1231, 1430, 1651, 1892, 2157, 2444, 2757, 3094, 3459, 3850, 4271, 4720, 5201, 5712, 6257, 6834, 7447, 8094, 8779, 9500, 10261, 11060, 11901, 12782, 13707, 14674, 15687 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..45.

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

FORMULA

a(n) = a(n-2) + n*(n-1) for n>2, a(1)=1, a(2)=2.

G.f.: x*(1 - x^3 + 3*x^2 - x)/((x + 1)*(x - 1)^4). [Maksym Voznyy (voznyy(AT)mail.ru), Aug 10 2009]

a(n) + a(n+1) = A064999(n). - R. J. Mathar, Feb 27 2016

a(n) = n*(n + 2)*(2*n - 1)/12 + 3*(1 - (-1)^n)/8. - Bruno Berselli, Mar 12 2018

EXAMPLE

n=1: 1;

n=2: 1*2;

n=3: 1 + 0*1 + 2*3 = 7;

n=4: 1*2 + 3*4 = 14;

n=5: 1 + 0*1 + 2*3 + 4*5 = 27;

n=6: 1*2 + 3*4 + 5*6 = 44;

n=7: 1 + 0*1 + 2*3 + 4*5 + 6*7 = 69, etc.

- Bruno Berselli, Mar 12 2018

MATHEMATICA

LinearRecurrence[{3, -2, -2, 3, -1}, {1, 2, 7, 14, 27}, 50] (* Vincenzo Librandi, Feb 28 2016 *)

PROG

(MAGMA) [n le 2 select n else Self(n-2)+n*(n-1):n in [1..50]]; // Vincenzo Librandi, Feb 28 2016

CROSSREFS

Cf. A178218 (first differences).

Sequence in context: A194111 A102999 A225277 * A227016 A268347 A210728

Adjacent sequences:  A014109 A014110 A014111 * A014113 A014114 A014115

KEYWORD

nonn,easy

AUTHOR

Jon Wild

EXTENSIONS

More terms from Erich Friedman.

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 February 19 09:55 EST 2020. Contains 332041 sequences. (Running on oeis4.)