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.

A000660 Boustrophedon transform of 1,1,2,3,4,5,...

Original entry on oeis.org

1, 2, 5, 14, 41, 136, 523, 2330, 11857, 67912, 432291, 3027166, 23125673, 191389108, 1705788659, 16289080922, 165919213089, 1795666675824, 20576824369027, 248892651678198, 3168999664907705, 42366404751871660, 593368400878431795, 8688251294851280594
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a000660 n = sum $ zipWith (*) (a109449_row n) (1 : [1..])
    -- Reinhard Zumkeller, Nov 04 2013
    
  • Maple
    seq(coeff(series(factorial(n)*(x*exp(x)+1)*(sec(x)+tan(x)), x,n+1),x,n),n=0..25); # Muniru A Asiru, Jul 30 2018
  • Mathematica
    a[n_] := n! SeriesCoefficient[(1+x Exp[x])(1+Sin[x])/Cos[x], {x, 0, n}];
    Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Jul 30 2018, after Sergei N. Gladkovskii *)
  • Python
    from itertools import accumulate, count, islice
    def A000660_gen(): # generator of terms
        yield 1
        blist = (1,)
        for i in count(1):
            yield (blist := tuple(accumulate(reversed(blist),initial=i)))[-1]
    A000660_list = list(islice(A000660_gen(),40)) # Chai Wah Wu, Jun 12 2022
  • Sage
    # Algorithm of L. Seidel (1877)
    def A000660_list(n) :
        R = []; A = {-1:0, 0:1}
        k = 0; e = 1
        for i in range(n) :
            Am = i
            A[k + e] = 0
            e = -e
            for j in (0..i) :
                Am += A[k]
                A[k] = Am
                k += e
            print([A[z] for z in (-i//2..i//2)])
            R.append(A[e*i//2])
        return R
    A000660_list(10) # Peter Luschny, Jun 02 2012
    

Formula

a(n) = Sum_{k=0..n} A109449(n,k)*A028310(k). - Reinhard Zumkeller, Nov 04 2013
E.g.f.: (x*exp(x) + 1)*(sec(x) + tan(x)). - Sergei N. Gladkovskii, Oct 28 2014
a(n) = A231179(n) + A000111(n). - Sergei N. Gladkovskii, Oct 28 2014
a(n) ~ n! * (2 + Pi*exp(Pi/2)) * (2/Pi)^(n+1). - Vaclav Kotesovec, Jun 12 2015