%I #16 Sep 08 2022 08:45:09
%S 3,7,35,199,1155,6727,39203,228487,1331715,7761799,45239075,263672647,
%T 1536796803,8957108167,52205852195,304278004999,1773462177795,
%U 10336495061767,60245508192803,351136554095047,2046573816377475,11928306344169799,69523264248641315
%N a(n) = 6*a(n-1) - a(n-2) - 4, a(0)=3, a(1)=7.
%C 2*(a(2*n+1) + 1) is a perfect square.
%H G. C. Greubel, <a href="/A081555/b081555.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Tu#2wis">Index entries for two-way infinite sequences</a>
%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (7,-7,1).
%F a(n) = A051927(2n).
%F a(n) = A003499(n) + 1.
%F a(2n) + 1 = A003499(n)^2.
%F a(n) = (3 + 2*sqrt(2))^n + (3 - 2*sqrt(2))^n + 1.
%F G.f.: (3-14*x+7*x^2)/((1-x)*(1-6*x+x^2)).
%p 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
%t a[n_]:= a[n] = 6*a[n-1] -a[n-2] -4; a[0] = 3; a[1] = 7; Table[a[n], {n, 0, 25}]
%t LinearRecurrence[{7,-7,1}, {3,7,35}, 30] (* _G. C. Greubel_, Aug 13 2019 *)
%o (PARI) a(n)=1+2*real((3+quadgen(32))^n)
%o (PARI) a(n)=1+2*subst(poltchebi(abs(n)),x,3)
%o (PARI) a(n)=if(n<0,a(-n),1+polsym(1-6*x+x^2,n)[n+1])
%o (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
%o (Sage)
%o def A081555_list(prec):
%o P.<x> = PowerSeriesRing(ZZ, prec)
%o return P((3-14*x+7*x^2)/((1-x)*(1-6*x+x^2))).list()
%o A081555_list(30) # _G. C. Greubel_, Aug 13 2019
%o (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
%Y Cf. A003499, A051927.
%K easy,nonn
%O 0,1
%A Mario Catalani (mario.catalani(AT)unito.it), Mar 24 2003