OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
F. T. Adams-Watters, SeqFan Discussion, Oct 2009
Index entries for linear recurrences with constant coefficients, signature (1,6,-6,-1,1).
FORMULA
{k: 25+k*(k+1)/2 in A000290}.
Conjectures: (Start)
a(n)= +a(n-1) +6*a(n-2) -6*a(n-3) -a(n-4) +a(n-5).
G.f.: x^2*(-18-3*x+18*x^2+x^3)/( (x-1) * (x^2+2*x-1) * (x^2-2*x-1)).
G.f.: ( 2 + 1/(x-1) + (10+29*x)/(x^2-2*x-1) + (-9+8*x)/(x^2+2*x-1) )/2. (End)
The first conjecture is true for the first 1000 terms of the sequence. - Harvey P. Dale, Jun 15 2013
EXAMPLE
0*(0+1)/2+25 = 5^2. 18*(18+1)/2+25 = 14^2. 21*(21+1)/2+25 = 16^2. 111*(111+1)/2+25 = 79^2.
MATHEMATICA
Join[{0}, Select[Range[0, 10^5], ( Ceiling[Sqrt[#*(# + 1)/2]] )^2 - #*(# + 1)/2 == 25 &]] (* or *) LinearRecurrence[{1, 6, -6, -1, 1}, {0, 18, 21, 111, 128}, 25] (* G. C. Greubel_, Sep 03 2016 *)
PROG
(PARI) for(n=1, 10^10, if(issquare(25+n*(n+1)/2), print1(n, ", ")))
CROSSREFS
KEYWORD
nonn,less,easy
AUTHOR
R. J. Mathar, Oct 18 2009
STATUS
approved