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.

A000746 Boustrophedon transform of triangular numbers.

Original entry on oeis.org

1, 4, 13, 39, 120, 407, 1578, 7042, 35840, 205253, 1306454, 9148392, 69887664, 578392583, 5155022894, 49226836114, 501420422112, 5426640606697, 62184720675718, 752172431553308, 9576956842743904, 128034481788227195
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a000746 n = sum $ zipWith (*) (a109449_row n) $ tail a000217_list
    -- Reinhard Zumkeller, Nov 03 2013
    
  • Magma
    R:=PowerSeriesRing(Rationals(), 30);
    Coefficients(R!(Laplace( (Sec(x)+Tan(x))*Exp(x)*(x^2+4*x+2)/2 ))); // G. C. Greubel, Jul 10 2025
    
  • Mathematica
    t[n_, 0] := (n + 1) (n + 2)/2; 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 A000746_gen(): # generator of terms
        blist, c = tuple(), 1
        for i in count(2):
            yield (blist := tuple(accumulate(reversed(blist),initial=c)))[-1]
            c += i
    A000746_list = list(islice(A000746_gen(),40)) # Chai Wah Wu, Jun 12 2022
    
  • SageMath
    @CachedFunction
    def f(n, k):
        if (k==0): return binomial(n+2,2)
        else: return f(n, k-1) + f(n-1, n-k)
    def A000746(n): return f(n,n)
    [A000746(n) for n in range(31)] # G. C. Greubel, Jul 10 2025

Formula

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