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.

A236257 a(n) = 2*n^2 - 7*n + 9.

Original entry on oeis.org

9, 4, 3, 6, 13, 24, 39, 58, 81, 108, 139, 174, 213, 256, 303, 354, 409, 468, 531, 598, 669, 744, 823, 906, 993, 1084, 1179, 1278, 1381, 1488, 1599, 1714, 1833, 1956, 2083, 2214, 2349, 2488, 2631, 2778, 2929, 3084, 3243, 3406, 3573, 3744, 3919, 4098, 4281, 4468
Offset: 0

Views

Author

Vladimir Shevelev, Jan 21 2014

Keywords

Comments

If zero polygonal numbers are ignored, then for n >= 3, the a(n)-th n-gonal number is a sum of the (a(n)-1)-th n-gonal number and the (2*n-3)-th n-gonal number.

Examples

			a(7)=58. This means that the 58th heptagonal number 8323 (cf. A000566) is a sum of two heptagonal numbers. We have 8323 = 8037 + 286 with indices in A000566 58,57,11.
		

Crossrefs

Programs

  • Mathematica
    Table[2 n^2 - 7 n + 9, {n, 0, 48}] (* Michael De Vlieger, Apr 19 2015 *)
    LinearRecurrence[{3,-3,1},{9,4,3},50] (* Harvey P. Dale, Nov 24 2017 *)
  • PARI
    Vec(-(18*x^2-23*x+9)/(x-1)^3 + O(x^100)) \\ Colin Barker, Jan 21 2014

Formula

From Colin Barker, Jan 21 2014: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: -(18*x^2 - 23*x + 9)/(x-1)^3. (End)
E.g.f.: exp(x)*(9 - 5*x + 2*x^2). - Elmo R. Oliveira, Nov 13 2024