OFFSET
0,3
COMMENTS
X values of solutions to the equation X^3 - (X + 1)^2 + X + 2 = Y^2.
To prove that X = 1 or X = n^2 - 1: Y^2 = X^3 - (X + 1)^2 + X + 2 = X^3 - X^2 - X + 1 = (X + 1)(X^2 - 2X + 1) = (X + 1)*(X - 1)^2 it means: X = 1 or (X + 1) must be a perfect square, so X = 1 or X = n^2 - 1 with n >= 1. Which gives: (X, Y) = (0, 1) or (X, Y) = (1, 0) or (X, Y) = (n^2 - 1, n*(n^2 - 2)) with n >= 2.
An equivalent technique of integer factorization would work for example for the equation X^3 + 3*X^2 - 9*X + 5 = (X+5)(X-1)^2 = Y^2, looking for perfect squares of the form X + 5 = n^2. Another example is X^3 + X^2 - 5*X + 3 = (X+3)*(X-1)^2 = Y^2 with solutions generated from perfect squares of the form X + 3 = n^2. - R. J. Mathar, Nov 20 2007
Sum of possible divisors of a prime number up to its square root, with duplicate entries removed. - Odimar Fabeny, Aug 25 2010
a(0) = 0, a(1) = 1 and a(n) is the smallest k different from n such that n divides k and n+1 divides k+1. - Michel Lagneau, Apr 27 2013
The identity (4*n^2-2)^2 - (n^2-1)*(4*n)^2 = 4 can be written as A060626(n+1)^2 - a(n+2)*A008586(n+2)^2 = 4. - Vincenzo Librandi, Jun 16 2014
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
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
EXAMPLE
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
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 *)
PROG
(Magma) [0, 1] cat [n^2 - 1: n in [2..60]]; // 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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mohamed Bouhamida, Nov 12 2007
EXTENSIONS
Definition simplified by N. J. A. Sloane, Sep 05 2010
STATUS
approved