cp's OEIS Frontend

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.

A178778 Partial sums of walks of length n+1 on a tetrahedron A001998.

Original entry on oeis.org

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

Views

Author

Jonathan Vos Post, Dec 26 2010

Keywords

Comments

The subsequence of primes begins 3, 7, 17, no more through a(27).

Examples

			a(5) = 1 + 2 + 4 + 10 + 25 + 70 = 112.
		

Crossrefs

Programs

  • Magma
    m:=30; R:=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
    
  • 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 *)
  • 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
    
  • 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

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)