A132411 a(0) = 0, a(1) = 1 and a(n) = n^2 - 1 with n >= 2.
0, 1, 3, 8, 15, 24, 35, 48, 63, 80, 99, 120, 143, 168, 195, 224, 255, 288, 323, 360, 399, 440, 483, 528, 575, 624, 675, 728, 783, 840, 899, 960, 1023, 1088, 1155, 1224, 1295, 1368, 1443, 1520, 1599, 1680, 1763, 1848, 1935, 2024, 2115, 2208, 2303, 2400, 2499, 2600
Offset: 0
Examples
0^3 - 1^2 + 2 = 1^2, 1^3 - 2^2 + 3 = 0^2, 3^3 - 4^2 + 5 = 4^2. For P(n) = 29 we have sqrt(29) = 5.3851... so possible divisors are 3 and 5; for P(n) = 53 we have sqrt(53) = 7.2801... so possible divisors are 3, 5 and 7. - _Odimar Fabeny_, Aug 25 2010
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
Programs
-
Magma
[0,1] cat [n^2 - 1: n in [2..60]]; // Vincenzo Librandi, May 01 2014
-
Maple
a:= n-> `if`(n<2, n, n^2-1): seq(a(n), n=0..55); # Alois P. Heinz, Jan 24 2021
-
Mathematica
Join[{0, 1}, LinearRecurrence[{3, -3, 1}, {3, 8, 15}, 80]] (* and *) Table[If[n < 2, n, n^2 - 1], {n, 0, 80}] (* Vladimir Joseph Stephan Orlovsky, Feb 14 2012 *) Join[{0,1},Range[2,50]^2-1] (* Harvey P. Dale, Feb 27 2013 *) CoefficientList[Series[x + x^2 (-3 + x)/(-1 + x)^3, {x, 0, 60}], x] (* Vincenzo Librandi, May 01 2014 *)
-
PARI
concat(0, Vec(x+x^2*(-3+x)/(-1+x)^3 + O(x^100))) \\ Altug Alkan, Dec 18 2015
-
PARI
a(n)=if(n>1,n^2-1,n) \\ Charles R Greathouse IV, Dec 18 2015
Formula
a(n) = A005563(n-1), n > 1.
G.f.: x + x^2*(-3+x)/(-1+x)^3. - R. J. Mathar, Nov 20 2007
Starting (1, 3, 8, 15, 24, ...) = binomial transform of [1, 2, 3, -1, 1, -1, ...]. - Gary W. Adamson, May 12 2008
Sum_{n>0} 1/a(n) = 7/4. - Enrique Pérez Herrero, Dec 18 2015
Sum_{n>=1} (-1)^(n+1)/a(n) = 3/4. - Amiram Eldar, Sep 27 2022
From Elmo R. Oliveira, May 29 2025: (Start)
E.g.f.: exp(x)*(x^2 + x - 1) + x + 1.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n >= 5. (End)
Extensions
Definition simplified by N. J. A. Sloane, Sep 05 2010
Comments