OFFSET
0,1
COMMENTS
2*(a(2*n+1) + 1) is a perfect square.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (7,-7,1).
FORMULA
MAPLE
seq(coeff(series((3-14*x+7*x^2)/((1-x)*(1-6*x+x^2)), x, n+1), x, n), n = 0 ..30); # G. C. Greubel, Aug 13 2019
MATHEMATICA
a[n_]:= a[n] = 6*a[n-1] -a[n-2] -4; a[0] = 3; a[1] = 7; Table[a[n], {n, 0, 25}]
LinearRecurrence[{7, -7, 1}, {3, 7, 35}, 30] (* G. C. Greubel, Aug 13 2019 *)
PROG
(PARI) a(n)=1+2*real((3+quadgen(32))^n)
(PARI) a(n)=1+2*subst(poltchebi(abs(n)), x, 3)
(PARI) a(n)=if(n<0, a(-n), 1+polsym(1-6*x+x^2, n)[n+1])
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (3-14*x+7*x^2)/((1-x)*(1-6*x+x^2)) )); // G. C. Greubel, Aug 13 2019
(Sage)
def A081555_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((3-14*x+7*x^2)/((1-x)*(1-6*x+x^2))).list()
A081555_list(30) # G. C. Greubel, Aug 13 2019
(GAP) a:=[3, 7];; for n in [3..30] do a[n]:=6*a[n-1]-a[n-2]-4; od; a; # G. C. Greubel, Aug 13 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Mario Catalani (mario.catalani(AT)unito.it), Mar 24 2003
STATUS
approved