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.

A185939 a(n) = 9*n^2 - 6*n + 2.

Original entry on oeis.org

5, 26, 65, 122, 197, 290, 401, 530, 677, 842, 1025, 1226, 1445, 1682, 1937, 2210, 2501, 2810, 3137, 3482, 3845, 4226, 4625, 5042, 5477, 5930, 6401, 6890, 7397, 7922, 8465, 9026, 9605, 10202, 10817, 11450
Offset: 1

Views

Author

Amir H. Farrahi, Feb 06 2011

Keywords

Comments

Group the set of natural numbers in set of 3 (1, 2, 3; 4, 5, 6; 7, 8, 9; ...) In each group, multiply the first two numbers and then add the third number to the result to get the corresponding entry in our sequence.

Programs

  • Mathematica
    CoefficientList[Series[-x*(x + 5)*(2*x + 1)/(x - 1)^3, {x,0,50}], x] (* or *) LinearRecurrence[{3, -3, 1}, {5, 26, 65}, 50] (* G. C. Greubel, Feb 25 2017 *)
    Table[9n^2-6n+2,{n,40}] (* or *) #[[1]]#[[2]]+#[[3]]&/@Partition[Range[111],3]  (* Harvey P. Dale, Apr 08 2022 *)
  • PARI
    x='x+O('x^50); Vec(-x*(x+5)*(2*x+1)/(x-1)^3) \\ G. C. Greubel, Feb 25 2017

Formula

G.f. -x*(x+5)*(2*x+1) / (x-1)^3 . - Alexander R. Povolotsky, Feb 06 2011
a(n) = a(n-1) + 18*n - 15, a(1) = 5. - Vincenzo Librandi, Feb 07 2011
a(n) = (2*n-1)^2 + (2*n)^2 + (n-1)^2. - Bruno Berselli, Feb 06 2012
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - G. C. Greubel, Feb 25 2017
E.g.f.: (9*x^2 + 3*x + 2)*exp(x) - 2. - G. C. Greubel, Jul 23 2017