A000746 Boustrophedon transform of triangular numbers.
1, 4, 13, 39, 120, 407, 1578, 7042, 35840, 205253, 1306454, 9148392, 69887664, 578392583, 5155022894, 49226836114, 501420422112, 5426640606697, 62184720675718, 752172431553308, 9576956842743904, 128034481788227195
Offset: 0
Keywords
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..400
- Peter Luschny, An old operation on sequences: the Seidel transform.
- J. Millar, N. J. A. Sloane and N. E. Young, A new operation on sequences: the Boustrophedon transform, J. Combin. Theory, 17A (1996), 44-54 (Abstract, pdf, ps).
- N. J. A. Sloane, Transforms.
- Wikipedia, Boustrophedon transform.
- Index entries for sequences related to boustrophedon transform
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