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.

A094705 Convolution of Jacobsthal(n) and 3^n.

Original entry on oeis.org

0, 1, 4, 15, 50, 161, 504, 1555, 4750, 14421, 43604, 131495, 395850, 1190281, 3576304, 10739835, 32241350, 96767741, 290390604, 871346575, 2614389250, 7843866801, 23532998504, 70601791715, 211810967550, 635444087461, 1906354632004, 5719108635255, 17157415384250
Offset: 0

Views

Author

Paul Barry, May 21 2004

Keywords

Comments

For k>2, a(n,k)=k^(n+1)/((k-2)(k+1))-2^(n+1)/(3k-6)-(-1)^n/(3k+3) gives the convolution of Jacobsthal(n) and k^n.
In general x/((1-ax)(1-ax-bx^2)) expands to Sum_{k=0..floor(n/2)} C(n-k,k+1)a^(n-k-1)*(b/a)^k. - Paul Barry, Oct 25 2004

Crossrefs

Cf. A001045 (Jacobsthal), A000244(3^n), A045883.

Programs

  • Magma
    [(3^(n+2) -2^(n+3) -(-1)^n)/12: n in [0..50]]; // G. C. Greubel, Jul 21 2022
    
  • Mathematica
    LinearRecurrence[{4,-1,-6},{0,1,4},30] (* Harvey P. Dale, Apr 02 2017 *)
    Jacob0[n_] := (2^n - (-1)^n)/3; a[n_] := First@ListConvolve[Table[Jacob0[i], {i, 0, n}], 3^Range[0, n]]; Table[a[x], {x, 0, 10}] (* Robert P. P. McKone, Nov 28 2020 *)
  • PARI
    concat(0, Vec(x/((1+x)*(1-2*x)*(1-3*x)) + O(x^50))) \\ Michel Marcus, Sep 13 2014
    
  • SageMath
    [(3^(n+1) - lucas_number1(n+3, 1, -2))/4 for n in (0..50)] # G. C. Greubel, Jul 21 2022

Formula

G.f.: x/((1+x)*(1-2*x)*(1-3*x)).
a(n) = (3^(n+2) - 2^(n+3) - (-1)^n)/12.
a(n) = 4*a(n-1) -a(n-2) -6*a(n-3).
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k+1)*2^(n-k-1)*(3/2)^k. - Paul Barry, Oct 25 2004
a(n) = (3^(n+1) - A001045(n+3))/4. - G. C. Greubel, Jul 21 2022