%I #20 Sep 08 2022 08:45:32
%S 3,12,42,123,366,1092,3279,9840,29526,88575,265722,797160,2391483,
%T 7174452,21523362,64570083,193710246,581130732,1743392199,5230176600,
%U 15690529806,47071589415,141214768242,423644304720,1270932914163
%N a(n) = 3*A132357(n).
%C Digital roots yield a hexaperiodic sequence A010888(a(n))= 3*A135265(n+1).
%H G. C. Greubel, <a href="/A135264/b135264.txt">Table of n, a(n) for n = 0..1000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3,0,-1,3).
%F a(n) = 3*a(n-1) - a(n-3) + 3*a(n-4).
%F G.f.: 3*(1 + x + 2*x^2)/(1 - 3*x + x^3 - 3*x^4). - _G. C. Greubel_, Oct 07 2016 [corrected by _Georg Fischer_, May 10 2019]
%p seq(coeff(series(3*(1+x+2*x^2)/(1-3*x+x^3-3*x^4), x, n+1), x, n), n = 0..30); # _G. C. Greubel_, Nov 21 2019
%t LinearRecurrence[{3,0,-1,3}, {3,12,42,123}, 25] (* _G. C. Greubel_, Oct 07 2016 *)
%o (PARI) my(x='x+O('x^30)); Vec(3*(1+x+2*x^2)/(1-3*x+x^3-3*x^4)) \\ _G. C. Greubel_, Nov 21 2019
%o (Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( 3*(1+x+2*x^2)/(1-3*x+x^3-3*x^4) )); // _G. C. Greubel_, Nov 21 2019
%o (Sage)
%o def A135264_list(prec):
%o P.<x> = PowerSeriesRing(ZZ, prec)
%o return P(3*(1+x+2*x^2)/(1-3*x+x^3-3*x^4)).list()
%o A135264_list(30) # _G. C. Greubel_, Nov 21 2019
%o (GAP) a:=[3,12,42,123];; for n in [5..30] do a[n]:=3*a[n-1]-a[n-3]+ 3*a[n-4]; od; a; # _G. C. Greubel_, Nov 21 2019
%K nonn,less,easy
%O 0,1
%A _Paul Curtz_, Dec 02 2007
%E Edited, corrected and extended by _R. J. Mathar_, Jul 28 2008