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.

A157910 a(n) = 18*n^2 - 1.

Original entry on oeis.org

17, 71, 161, 287, 449, 647, 881, 1151, 1457, 1799, 2177, 2591, 3041, 3527, 4049, 4607, 5201, 5831, 6497, 7199, 7937, 8711, 9521, 10367, 11249, 12167, 13121, 14111, 15137, 16199, 17297, 18431, 19601, 20807, 22049, 23327, 24641, 25991, 27377, 28799, 30257, 31751
Offset: 1

Views

Author

Vincenzo Librandi, Mar 09 2009

Keywords

Comments

The identity (18*n^2 - 1)^2 - (81*n^2 - 9)*(2*n)^2 = 1 can be written as a(n)^2 - A157909(n)*A005843(n)^2 = 1. - Vincenzo Librandi, Feb 08 2012

Crossrefs

Programs

  • Magma
    I:=[17, 71, 161]; [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 08 2012
    
  • Mathematica
    18Range[40]^2-1  (* Harvey P. Dale, Mar 24 2011 *)
    LinearRecurrence[{3, -3, 1}, {17, 71, 161}, 50] (* Vincenzo Librandi, Feb 08 2012 *)
  • PARI
    for(n=1, 40, print1(18*n^2 - 1", ")); \\ Vincenzo Librandi, Feb 08 2012

Formula

From Vincenzo Librandi, Feb 08 2012: (Start)
G.f.: x*(-17 - 20*x + x^2)/(x - 1)^3.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). (End)
From Amiram Eldar, Mar 07 2023: (Start)
Sum_{n>=1} 1/a(n) = (1 - cot(Pi/(3*sqrt(2)))*Pi/(3*sqrt(2)))/2.
Sum_{n>=1} (-1)^(n+1)/a(n) = (cosec(Pi/(3*sqrt(2)))*Pi/(3*sqrt(2)) - 1)/2. (End)