|
|
A276599
|
|
Values of n such that n^2 + 5 is a triangular number (A000217).
|
|
5
|
|
|
1, 4, 10, 25, 59, 146, 344, 851, 2005, 4960, 11686, 28909, 68111, 168494, 396980, 982055, 2313769, 5723836, 13485634, 33360961, 78600035, 194441930, 458114576, 1133290619, 2670087421, 6605301784, 15562409950, 38498520085, 90704372279, 224385818726
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 6*a(n-2) - a(n-4) for n>4.
G.f.: x*(1+x)*(1+3*x+x^2) / ((1+2*x-x^2)*(1-2*x-x^2)).
a(n) = (1/4)*(P(n+2) + P(n+1) + (-1)^n*(3*P(n) - 7*P(n-1))), where P(n) = A000129(n). - G. C. Greubel, Sep 15 2021
|
|
EXAMPLE
|
4 is in the sequence because 4^2 + 5 = 21, which is a triangular number.
|
|
MATHEMATICA
|
CoefficientList[Series[(1+x)*(1+3*x+x^2)/((1+2*x-x^2)*(1-2*x-x^2)), {x, 0, 30}], x] (* Wesley Ivan Hurt, Sep 07 2016 *)
LinearRecurrence[{0, 6, 0, -1}, {1, 4, 10, 25}, 30] (* Harvey P. Dale, Feb 13 2017 *)
|
|
PROG
|
(PARI) Vec(x*(1+x)*(1+3*x+x^2)/((1+2*x-x^2)*(1-2*x-x^2)) + O(x^40))
(Magma) I:=[1, 4, 10, 25]; [n le 4 select I[n] else 6*Self(n-2) - Self(n-4): n in [1..31]]; // G. C. Greubel, Sep 15 2021
(Sage)
def P(n): return lucas_number1(n, 2, -1)
[(1/4)*(P(n+2) + P(n+1) + (-1)^n*(3*P(n) - 7*P(n-1))) for n in (1..30)] # G. C. Greubel, Sep 15 2021
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|