OFFSET
1,4
COMMENTS
All terms of A303305 belong to this sequence.
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,2,-2,0,0,-1,1).
FORMULA
O.g.f.: x*(-1 + x + x^2 + 2*x^3 + 9*x^4 + 2*x^5 + x^6 + x^7 - x^8)/((1 + x)^2*(1 - x)^3*(1 + x^2)^2).
a(n) = a(1-n) = a(n-1) + 2*a(n-4) - 2*a(n-5) - a(n-8) + a(n-9).
a(n) = (30*n^2 - 2*(15 + 3*(-1)^n + 10*i^(n*(n+1)))*n + 2*(5 + (-1)^n)*i^(n*(n+1)) + 3*(-1)^n - 79)/64, with i = sqrt(-1). Therefore:
a(4*k+1) = (3*k + 2)*(5*k - 1)/2;
a(4*k+2) = k*(15*k + 13)/2, first bisection of A303305;
a(4*k+4) = (3*k + 1)*(5*k + 6)/2.
MAPLE
select(k->issqr(120*k+169), [$-1..1500]); # Muniru A Asiru, Jul 10 2018
MATHEMATICA
LinearRecurrence[{1, 0, 0, 2, -2, 0, 0, -1, 1}, {-1, 0, 1, 3, 10, 14, 17, 22, 36}, 60]
PROG
(Magma) [k: k in [0..1500] | IsSquare(120*k+169)];
(Sage) print([k for k in (0..1500) if is_square(120*k+169)])
(PARI) isok(n) = issquare(120*n+169); \\ Michel Marcus, Jul 11 2018
(PARI) Vec(x*(-1 + x + x^2 + 2*x^3 + 9*x^4 + 2*x^5 + x^6 + x^7 - x^8)/((1 + x)^2*(1 - x)^3*(1 + x^2)^2) + O(x^40)) \\ Colin Barker, Jul 18 2018
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Bruno Berselli, Jul 10 2018
STATUS
approved