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.

A121354 a(n) = (3*n-1)*a(n-1) - a(n-2).

Original entry on oeis.org

0, 1, 5, 39, 424, 5897, 99825, 1990603, 45684044, 1185794541, 34342357645, 1097769650099, 38387595395820, 1457630855391061, 59724477475637681, 2626419378072666903, 123381986291939706760, 6166472895218912671097, 326699681460310431861381, 18289015688882165271566239
Offset: 0

Views

Author

Roger L. Bagula and Bob Hanlon (hanlonr(AT)cox.net), Sep 05 2006

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_Integer] = Module[{a}, a[n] /. RSolve[{a[n] == (3*n - 1)*a[n - 1] - a[n - 2], a[0] == 0, a[1] == 1}, a[n], n][[1]] // FullSimplify] Rationalize[N[Table[f[n], {n, 0, 25}], 100], 0]
    RecurrenceTable[{a[0]==0,a[1]==1,a[n]==(3n-1)a[n-1]-a[n-2]},a,{n,20}] (* Harvey P. Dale, Jul 29 2014 *)
  • Python
    from sympy import cacheit
    @cacheit
    def A121354(n):
        if n <= 1:
            return n
        else:
            return (3*n-1)*A121354(n-1)-A121354(n-2)
    print([A121354(n) for n in range(20)]) # Oct 14 2009
    
  • Sage
    def A121354(n):
        if n < 2: return n
        return 3^(n-1)*gamma(n+2/3)*hypergeometric([1/2-n/2, 1-n/2], [5/3, 1/3-n, 1-n], -4/9) /gamma(5/3)
    [round(A121354(n).n(100)) for n in (0..19)] # Peter Luschny, Sep 10 2014

Formula

a(n) = Pi* ( J_{n+2/3}(2/3) * Y_{2/3}(2/3) - J_{2/3}(2/3)* Y_{n+2/3}(2/3) )/3 , where J and Y are Bessel functions.
a(n) = Sum_{k = 0..floor((n-1)/2)} (-1)^k*3^(n-2*k-1)*(n-2*k-1)!*binomial(n-k-1,k)*binomial(n-k-1/3,k+2/3), cf. A058798. - Peter Bala, Aug 01 2013
a(n) ~ BesselJ(2/3, 2/3) * sqrt(2*Pi) * 3^(n-1/3) * n^(n+1/6) / exp(n). - Vaclav Kotesovec, Jul 31 2014
a(n) = 3^(n-1)*Gamma(n+2/3)*hypergeometric([1/2-n/2, 1-n/2], [5/3, 1/3-n, 1-n], -4/9)/Gamma(5/3) for n >= 2. - Peter Luschny, Sep 10 2014

Extensions

Offset corrected by the Associate Editors of the OEIS - Oct 14 2009