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 A178778 #21 Sep 08 2022 08:45:54 %S A178778 1,3,7,17,42,112,308,882,2563,7565,22449,66979,200204,599514,1796350, %T A178778 5385764,16150725,48442327,145307291,435892341,1307617966,3922765316, %U A178778 11768118792,35304090646,105911740487,317734424289,953201678533,2859602644103,8578803149328 %N A178778 Partial sums of walks of length n+1 on a tetrahedron A001998. %C A178778 The subsequence of primes begins 3, 7, 17, no more through a(27). %H A178778 Colin Barker, <a href="/A178778/b178778.txt">Table of n, a(n) for n = 0..1000</a> %H A178778 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (5,-4,-12,21,-9). %F A178778 a(n) = Sum_{i=0..n} (if i mod 2 = 0 then ((3^((i-2)/2)+1)/2)^2 else 3^((i-3)/2)+(1/4)*(3^(i-2)+1)). %F A178778 G.f.: (6*x^3-4*x^2-2*x+1) / ((x-1)^2*(3*x-1)*(3*x^2-1)). - _Colin Barker_, Apr 20 2013 %F A178778 From _Colin Barker_, May 17 2016: (Start) %F A178778 a(n) = (-7+3^(1+n)+3^(1/2*(-1+n))*(9-9*(-1)^n+5*sqrt(3)+5*(-1)^n*sqrt(3))+2*(1+n))/8. %F A178778 a(n) = (2*n + 10*3^(n/2) + 3^(n+1) - 5)/8 for n even. %F A178778 a(n) = (2*n + 3^(n+1) + 2*3^((n+3)/2) - 5)/8 for n odd. %F A178778 a(n) = 5*a(n-1) - 4*a(n-2) - 12*a(n-3) + 21*a(n-4) - 9*a(n-5) for n>4. %F A178778 (End) %e A178778 a(5) = 1 + 2 + 4 + 10 + 25 + 70 = 112. %t A178778 CoefficientList[Series[(6*x^3-4*x^2-2*x+1)/((x-1)^2*(3*x-1)*(3*x^2-1)), {x,0,30}], x] (* _G. C. Greubel_, Jan 24 2019 *) %o A178778 (PARI) Vec((1-2*x-4*x^2+6*x^3)/((1-x)^2*(1-3*x)*(1-3*x^2)) + O(x^50)) \\ _Colin Barker_, May 17 2016 %o A178778 (Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!( (6*x^3-4*x^2-2*x+1)/((x-1)^2*(3*x-1)*(3*x^2-1)) )); // _G. C. Greubel_, Jan 24 2019 %o A178778 (Sage) ((6*x^3-4*x^2-2*x+1)/((x-1)^2*(3*x-1)*(3*x^2-1))).series(x, 30).coefficients(x, sparse=False) # _G. C. Greubel_, Jan 24 2019 %Y A178778 Cf. A001998, A036359, A002216, A005963, A000228, A001997, A001444, A038766. %K A178778 nonn,easy %O A178778 0,2 %A A178778 _Jonathan Vos Post_, Dec 26 2010