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.

A000754 Boustrophedon transform of odd numbers.

Original entry on oeis.org

1, 4, 12, 33, 96, 317, 1218, 5425, 27608, 158129, 1006574, 7048657, 53847420, 445643681, 3971876930, 37928628529, 386337833232, 4181155148673, 47912508680086, 579538956964241, 7378919177090244, 98648882783190305
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A005408.

Programs

  • Haskell
    a000754 n = sum $ zipWith (*) (a109449_row n) [1, 3 ..]
    -- Reinhard Zumkeller, Nov 02 2013
    
  • Mathematica
    CoefficientList[Series[(Sec[x]+Tan[x])*E^x*(2*x+1), {x, 0, 20}], x] * Range[0, 20]! (* Vaclav Kotesovec, Oct 30 2014 after Sergei N. Gladkovskii *)
    t[n_, 0] := 2n + 1; t[n_, k_] := t[n, k] = t[n, k - 1] + t[n - 1, n - k]; a[n_] := t[n, n]; Array[a, 30, 0] (* Jean-François Alcover, Feb 12 2016 *)
  • Python
    from itertools import accumulate, count, islice
    def A000754_gen(): # generator of terms
        blist = tuple()
        for i in count(1,2):
            yield (blist := tuple(accumulate(reversed(blist),initial=i)))[-1]
    A000754_list = list(islice(A000754_gen(),40)) # Chai Wah Wu, Jun 12 2022

Formula

From Reinhard Zumkeller, Nov 02 2013: (Start)
a(n) = Sum_{k=0..n} A116666(n+1,k)*A000111(n-k).
a(n) = Sum_{k=0..n} A109449(n,k)*(2*k + 1). (End)
E.g.f.: (sec(x) + tan(x))*exp(x)*(2*x + 1). - Sergei N. Gladkovskii, Oct 30 2014
a(n) ~ n! * (Pi+1) * exp(Pi/2) * 2^(n+2) / Pi^(n+1). - Vaclav Kotesovec, Oct 30 2014