cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A269112 a(n) = (3*(n-1)*n + (-1)^((n-1)*n/2) + 5)/2.

Original entry on oeis.org

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
Offset: 1

Views

Author

Mikk Heidemaa, Feb 19 2016

Keywords

Crossrefs

Programs

  • 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
    
  • 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]
  • 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
    
  • Sage
    [(3*(n-1)*n+(-1)^((n-1)*n/2)+5)/2 for n in (1..50)] # Bruno Berselli, Feb 23 2016

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

Extensions

Edited by Bruno Berselli, Feb 23 2016