This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A132353 #21 Feb 17 2025 13:38:01 %S A132353 1,2,6,20,61,183,547,1640,4920,14762,44287,132861,398581,1195742, %T A132353 3587226,10761680,32285041,96855123,290565367,871696100,2615088300, %U A132353 7845264902,23535794707,70607384121,211822152361,635466457082 %N A132353 a(n) = 3*a(n-1) - a(n-3) + 3*a(n-4), starting with 1, 2, 6, 20. %C A132353 A132868(n) - a(n) = A128834(n) (discovered in 1995). %H A132353 G. C. Greubel, <a href="/A132353/b132353.txt">Table of n, a(n) for n = 0..1000</a> %H A132353 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (3,0,-1,3). %F A132353 Also a(n) - 3^(n+1) = hexaperiodic 1, -1, -3, -1, 1, 3; cf. A132951. %F A132353 From _R. J. Mathar_, Apr 04 2008: (Start) %F A132353 O.g.f.: (1-x+3*x^3)/((1-3*x)*(1+x)*(x^2-x+1)). %F A132353 a(n) = -(-1)^n/12 + 3^(n+1)/4 + A057079(n+2)/3. (End) %t A132353 LinearRecurrence[{3, 0, -1, 3}, {1, 2, 6, 20}, 50] (* _G. C. Greubel_, Jan 15 2018 *) %t A132353 nxt[{a_,b_,c_,d_}]:={b,c,d,3d-b+3a}; NestList[nxt,{1,2,6,20},50][[;;,1]] (* _Harvey P. Dale_, Feb 17 2025 *) %o A132353 (PARI) x='x+O('x^30); Vec((1-x+3*x^3)/((1-3*x)*(1+x)*(x^2-x+1))) \\ _G. C. Greubel_, Jan 15 2018 %o A132353 (Magma) I:=[1,2,6,20]; [n le 4 select I[n] else 3*Self(n-1) - Self(n-3) + 3*Self(n-4): n in [1..30]]; // _G. C. Greubel_, Jan 15 2018 %Y A132353 Cf. A129339. %K A132353 nonn %O A132353 0,2 %A A132353 _Paul Curtz_, Nov 24 2007 %E A132353 More terms from _R. J. Mathar_, Apr 04 2008