login
A305292
Numbers k such that k-1 is a square and k+1 is a triangular number.
1
2, 5, 65, 170, 2210, 5777, 75077, 196250, 2550410, 6666725, 86638865, 226472402, 2943171002, 7693394945, 99981175205, 261348955730, 3396416785970, 8878171099877, 115378189547777, 301596468440090, 3919462027838450, 10245401755863185, 133146330756959525
OFFSET
1,1
COMMENTS
It is easy to prove that there are no numbers k such that k-1 is a triangular number and k+1 is a square.
FORMULA
G.f.: x*(2 + 3*x - 8*x^2 + 3*x^3 + 2*x^4)/((1 - x)*(1 - 6*x + x^2)*(1 + 6*x + x^2)).
a(n) = a(-n-1) = a(n-1) + 34*a(n-2) - 34*a(n-3) - a(n-4) + a(n-5).
a(n) = 35*a(n-2) - 35*a(n-4) + a(n-6) = 34*a(n-2) - a(n-4) + 2.
a(n) = (-2 + (13*sqrt(2) + 7*(-1)^n)*(1 + sqrt(2))^(2*n+1) - (13*sqrt(2) - 7* (-1)^n)*(1 - sqrt(2))^(2*n+1))/32.
a(n) = A214838(n) - 1.
a(n) = A077241(n-1)^2 + 1.
MATHEMATICA
LinearRecurrence[{1, 34, -34, -1, 1}, {2, 5, 65, 170, 2210}, 25]
PROG
(PARI) Vec(x*(2 + 3*x - 8*x^2 + 3*x^3 + 2*x^4)/((1 - x)*(1 - 6*x + x^2)*(1 + 6*x + x^2)) + O(x^30)) \\ Colin Barker, Jun 14 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Jun 11 2018
STATUS
approved