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!)
A269112 a(n) = (3*(n-1)*n + (-1)^((n-1)*n/2) + 5)/2. 1
3, 5, 11, 21, 33, 47, 65, 87, 111, 137, 167, 201, 237, 275, 317, 363, 411, 461, 515, 573, 633, 695, 761, 831, 903, 977, 1055, 1137, 1221, 1307, 1397, 1491, 1587, 1685, 1787, 1893, 2001, 2111, 2225, 2343, 2463, 2585, 2711, 2841, 2973, 3107, 3245, 3387, 3531, 3677, 3827 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Bruno Berselli, Table of n, a(n) for n = 1..1000

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

FORMULA

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

a(n) = (3*n^2 - 3*n + cos(n*Pi/2) + sin(n*Pi/2) + 5)/2.

a(n) = 3*(n-1)^2 - 3*(n-1) - a(n-2) + 8 for n>2.

a(n) = 3*a(n-1) - 4*a(n-2) + 4*a(n-3) - 3*a(n-4) + a(n-5) for n>5. - Colin Barker, Feb 22 2016

a(n) = A047270(A000124(n-1)). - Bruno Berselli, Feb 23 2016

MATHEMATICA

Table[(3 (n - 1) n + (-1)^((n - 1) n/2) + 5)/2, {n, 100}]

LinearRecurrence[{3, -4, 4, -3, 1}, {3, 5, 11, 21, 33}, 100]

CoefficientList[Series[(3-4*x+8*x^2-4*x^3+3*x^4)/((1+x^2)*(1-x)^3), {x, 0, 100}], x]

PROG

(PARI) Vec((3-4*x+8*x^2-4*x^3+3*x^4)/((1+x^2)*(1-x)^3) + O(x^60)) \\ Michel Marcus, Feb 22 2016

(MAGMA) I:=[3, 5]; [n le 2 select I[n] else 3*(n-1)^2-3*(n-1)- Self(n-2)+8: n in [1..50]]; // Vincenzo Librandi, Feb 22 2016

(Sage) [(3*(n-1)*n+(-1)^((n-1)*n/2)+5)/2 for n in (1..50)] // Bruno Berselli, Feb 23 2016

CROSSREFS

Cf. A005408, A047270.

Sequence in context: A082713 A074710 A057460 * A093328 A045515 A298342

Adjacent sequences:  A269109 A269110 A269111 * A269113 A269114 A269115

KEYWORD

nonn,easy

AUTHOR

Mikk Heidemaa, Feb 19 2016

EXTENSIONS

Edited by Bruno Berselli, Feb 23 2016

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 May 16 17:22 EDT 2021. Contains 343949 sequences. (Running on oeis4.)