login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A178778
Partial sums of walks of length n+1 on a tetrahedron A001998.
1
1, 3, 7, 17, 42, 112, 308, 882, 2563, 7565, 22449, 66979, 200204, 599514, 1796350, 5385764, 16150725, 48442327, 145307291, 435892341, 1307617966, 3922765316, 11768118792, 35304090646, 105911740487, 317734424289, 953201678533, 2859602644103, 8578803149328
OFFSET
0,2
COMMENTS
The subsequence of primes begins 3, 7, 17, no more through a(27).
FORMULA
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)).
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
From Colin Barker, May 17 2016: (Start)
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.
a(n) = (2*n + 10*3^(n/2) + 3^(n+1) - 5)/8 for n even.
a(n) = (2*n + 3^(n+1) + 2*3^((n+3)/2) - 5)/8 for n odd.
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.
(End)
EXAMPLE
a(5) = 1 + 2 + 4 + 10 + 25 + 70 = 112.
MATHEMATICA
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 *)
PROG
(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
(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
(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
KEYWORD
nonn,easy
AUTHOR
Jonathan Vos Post, Dec 26 2010
STATUS
approved