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.

A257083 Partial sums of A257088.

Original entry on oeis.org

1, 2, 6, 9, 17, 22, 34, 41, 57, 66, 86, 97, 121, 134, 162, 177, 209, 226, 262, 281, 321, 342, 386, 409, 457, 482, 534, 561, 617, 646, 706, 737, 801, 834, 902, 937, 1009, 1046, 1122, 1161, 1241, 1282, 1366, 1409, 1497, 1542, 1634, 1681, 1777, 1826, 1926, 1977
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 17 2015

Keywords

Comments

Equivalently, numbers of the form m*(3*m+2)+1, where m = 0, -1, 1, -2, 2, -3, 3, ... - Bruno Berselli, Jan 05 2016
Also, numbers k such that 3*k-2 is a square. - Bruno Berselli, Jan 30 2018

Crossrefs

Cf. A246695 (partial sums), A257088.
Cf. A056109: numbers of the form m*(3*m+2)+1 for nonnegative m.

Programs

  • Haskell
    a257083 n = a257083_list !! n
    a257083_list = scanl1 (+) a257088_list
    
  • Magma
    [(6*n*(n+1) + (2*n+1)*(-1)^n + 7)/8 : n in [0..60]]; // Wesley Ivan Hurt, Oct 30 2022
  • Mathematica
    Table[(6 n (n + 1) + (2 n + 1) (-1)^n + 7)/8, {n, 0, 60}] (* Bruno Berselli, Jan 05 2016 *)
  • PARI
    vector(60, n, n--; (6*n*(n+1)+(2*n+1)*(-1)^n+7)/8) \\ Bruno Berselli, Jan 05 2016
    

Formula

From Bruno Berselli, Jan 05 2016: (Start)
G.f.: (1 + x + 2*x^2 + x^3 + x^4)/((1 + x)^2*(1 - x)^3).
a(n) = (6*n*(n+1) + (2*n+1)*(-1)^n + 7)/8. (End)
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5). - Wesley Ivan Hurt, Oct 30 2022