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.

A157872 a(n) = 9*n^2 - 3.

Original entry on oeis.org

6, 33, 78, 141, 222, 321, 438, 573, 726, 897, 1086, 1293, 1518, 1761, 2022, 2301, 2598, 2913, 3246, 3597, 3966, 4353, 4758, 5181, 5622, 6081, 6558, 7053, 7566, 8097, 8646, 9213, 9798, 10401, 11022, 11661, 12318, 12993, 13686, 14397, 15126, 15873, 16638, 17421, 18222
Offset: 1

Views

Author

Vincenzo Librandi, Mar 08 2009

Keywords

Comments

The identity (6*n^2 - 1)^2 - (9*n^2 - 3)*(2*n)^2 = 1 can be written as A140811(n-1)^2 - a(n)*A005843(n+1)^2 = 1. - Vincenzo Librandi, Feb 05 2012

Crossrefs

Programs

  • Magma
    I:=[6, 33, 78]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Feb 05 2012
    
  • Mathematica
    LinearRecurrence[{3, -3, 1}, {6, 33, 78}, 50] (* Vincenzo Librandi, Feb 05 2012 *)
    9*Range[50]^2-3 (* Harvey P. Dale, Aug 04 2024 *)
  • PARI
    for(n=1, 40, print1(9*n^2 - 3", ")); \\ Vincenzo Librandi, Feb 05 2012

Formula

From Vincenzo Librandi, Feb 05 2012: (Start)
G.f.: -3*x*(2 + 5*x - x^2)/(x - 1)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = a(n-1) + 18*n - 9. (End)
From Amiram Eldar, May 28 2022: (Start)
a(n) = 3*A080663(n).
Sum_{n>=1} 1/a(n) = (1 - (Pi/sqrt(3)*cot(Pi/sqrt(3))))/6.
Sum_{n>=1} (-1)^(n+1)/a(n) = ((Pi/sqrt(3))*csc(Pi/sqrt(3)) - 1)/6. (End)
E.g.f.: 3*(exp(x)*(3*x^2 + 3*x - 1) + 1). - Elmo R. Oliveira, Jan 25 2025