OFFSET
0,2
COMMENTS
Also numbers k such that 7*A000217(k) is a square. - Metin Sariyar, Nov 16 2019
LINKS
Colin Barker, Table of n, a(n) for n = 0..650
Index entries for linear recurrences with constant coefficients, signature (31,-31,1).
FORMULA
sqrt(a(n)+1) + sqrt(a(n)) = (sqrt(8) + sqrt(7))^n.
sqrt(a(n)+1) - sqrt(a(n)) = (sqrt(8) - sqrt(7))^n.
a(n) = 31*a(n-1) - 31*a(n-2) + a(n-3) for n > 2.
From Colin Barker, Dec 25 2018: (Start)
G.f.: 7*x*(1 + x) / ((1 - x)*(1 - 30*x + x^2)).
a(n) = ((15+4*sqrt(14))^(-n) * (-1+(15+4*sqrt(14))^n)^2) / 4.
(End)
E.g.f.: (1/4)*(-2*exp(x) + exp((15-4*sqrt(14))*x) + exp((15+4*sqrt(14))*x)). - Stefano Spezia, Nov 16 2019
2*a(n) = A068203(n)-1. - R. J. Mathar, Mar 16 2023
EXAMPLE
(sqrt(8) + sqrt(7))^2 = 15 + 2*sqrt(56) = sqrt(225) + sqrt(224). So a(2) = 224.
MATHEMATICA
LinearRecurrence[{31, -31, 1}, {0, 7, 224}, 18] (* Metin Sariyar, Nov 23 2019 *)
PROG
(PARI) concat(0, Vec(7*x*(1 + x) / ((1 - x)*(1 - 30*x + x^2)) + O(x^20))) \\ Colin Barker, Dec 25 2018
(Magma) a:=[0, 7]; [n le 2 select a[n] else 30*Self(n-1)-Self(n-2)+14: n in [1..18]]; // Marius A. Burtea, Nov 16 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 18); [0] cat Coefficients(R!(7*x*(1 + x) / ((1 - x)*(1-30*x + x^2)))); // Marius A. Burtea, Nov 16 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Dec 24 2018
STATUS
approved