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.

Previous Showing 11-20 of 37 results. Next

A009337 Expansion of e.g.f.: log(1+sin(x))/exp(x).

Original entry on oeis.org

0, 1, -3, 7, -16, 40, -117, 411, -1720, 8384, -46561, 289595, -1991504, 14993108, -122595085, 1081616659, -10239597968, 103522029312, -1113074512289, 12681693805203, -152613117638712, 1934275341388596, -25753344727083773
Offset: 0

Views

Author

Keywords

Comments

This sequence starting with the 2nd term, unsigned, is the partial sums of A000667. - Gerald McGarvey, Aug 13 2004

Crossrefs

Cf. A000667.

Programs

  • Mathematica
    With[{nn=30},CoefficientList[Series[Log[1+Sin[x]]/Exp[x],{x,0,nn}], x] Range[0,nn]!] (* Harvey P. Dale, Aug 13 2012 *)

Formula

a(n) ~ (n-1)! * (-1)^(n+1) * exp(Pi/2) * 2^(n+1) / Pi^n. - Vaclav Kotesovec, Jan 23 2015

Extensions

Extended with signs by Olivier Gérard, Mar 15 1997
Definition clarified by Harvey P. Dale, Aug 13 2012

A062161 Boustrophedon transform of n mod 2.

Original entry on oeis.org

0, 1, 2, 4, 12, 36, 142, 624, 3192, 18256, 116282, 814144, 6219972, 51475776, 458790022, 4381112064, 44625674352, 482962852096, 5534347077362, 66942218896384, 852334810990332, 11394877025289216, 159592488559874302, 2336793875186479104, 35703580441464231912
Offset: 0

Views

Author

Frank Ellermann, Jun 10 2001

Keywords

Crossrefs

Programs

  • Haskell
    a062161 n = sum $ zipWith (*) (a109449_row n) $ cycle [0,1]
    -- Reinhard Zumkeller, Nov 03 2013
    
  • Mathematica
    With[{nn=30},CoefficientList[Series[(Sec[x]+Tan[x])Sinh[x],{x,0,nn}],x] Range[ 0,nn]!] (* Harvey P. Dale, Feb 16 2013 *)
  • Python
    from itertools import accumulate, islice
    def A062161_gen(): # generator of terms
        blist, m = tuple(), 1
        while True:
            yield (blist := tuple(accumulate(reversed(blist),initial=(m := 1-m))))[-1]
    A062161_list = list(islice(A062161_gen(),40)) # Chai Wah Wu, Jun 12 2022
  • Sage
    # Generalized algorithm of L. Seidel (1877)
    def A062161_list(n) :
        R = []; A = {-1:0, 0:0}
        k = 0; e = 1
        for i in range(n) :
            Am = 1 if e == -1 else 0
            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
    A062161_list(10) # Peter Luschny, Jun 02 2012
    

Formula

a(2n) = A009747(n), a(2n+1) = A002084(n).
E.g.f.: (sec(x)+tan(x))*sinh(x); a(n)=(A000667(n)-A062162(n))/2. - Paul Barry, Jan 21 2005
a(n) = Sum{k, k>=0} binomial(n, 2k+1)*A000111(n-2k-1). - Philippe Deléham, Aug 28 2005
a(n) = Sum_{k=0..n} A109449(n,k) * (k mod 2). - Reinhard Zumkeller, Nov 03 2013 [corrected by Jason Yuen, Jan 07 2025]

A292975 Square array A(n,k), n >= 0, k >= 0, read by antidiagonals, where column k is the expansion of e.g.f. exp(k*x)*(sec(x) + tan(x)).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 4, 2, 1, 4, 9, 9, 5, 1, 5, 16, 28, 24, 16, 1, 6, 25, 65, 93, 77, 61, 1, 7, 36, 126, 272, 338, 294, 272, 1, 8, 49, 217, 645, 1189, 1369, 1309, 1385, 1, 9, 64, 344, 1320, 3380, 5506, 6238, 6664, 7936, 1, 10, 81, 513, 2429, 8141, 18285, 27365, 31993, 38177, 50521
Offset: 0

Views

Author

Ilya Gutkovskiy, Sep 27 2017

Keywords

Comments

A(n,k) is the k-th binomial transform of A000111 evaluated at n.
Also column k is the boustrophedon transform of powers of k.

Examples

			E.g.f. of column k: A_k(x) = 1 + (k + 1)*x/1! + (k + 1)^2*x^2/2! + (k^3 + 3*k^2 + 3*k + 2)*x^3/3! + (k^4 + 4*k^3 + 6*k^2 + 8*k + 5)*x^4/4! + ...
Square array begins:
   1,   1,    1,     1,     1,     1,  ...
   1,   2,    3,     4,     5,     6,  ...
   1,   4,    9,    16,    25,    36,  ...
   2,   9,   28,    65,   126,   217,  ...
   5,  24,   93,   272,   645,  1320,  ...
  16,  77,  338,  1189,  3380,  8141,  ...
		

Crossrefs

Columns k=0..2 give A000111, A000667, A000752.
Main diagonal gives A292976.

Programs

  • Maple
    b:= proc(u, o) option remember; `if`(u+o=0, 1,
          add(b(o-1+j, u-j), j=1..u))
        end:
    A:= proc(n, k) option remember; `if`(k=0, b(n, 0),
          add(binomial(n, j)*A(j, k-1), j=0..n))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..12);  # Alois P. Heinz, Sep 27 2017
  • Mathematica
    Table[Function[k, n! SeriesCoefficient[Exp[k x] (Sec[x] + Tan[x]), {x, 0, n}]][j - n], {j, 0, 10}, {n, 0, j}] // Flatten

Formula

E.g.f. of column k: exp(k*x)*(sec(x) + tan(x)).

A062704 Di-Boustrophedon transform of all 1's sequence: Fill in an array by diagonals alternating in the 'up' and 'down' directions. Each diagonal starts with a 1. When going in the 'up' direction the next element is the sum of the previous element of the diagonal and the previous two elements of the row the new element is in. When going in the 'down' direction the next element is the sum of the previous element of the diagonal and the previous two elements of the column the new element is in. The final element of the n-th diagonal is a(n).

Original entry on oeis.org

1, 2, 5, 13, 40, 145, 616, 3017, 16752, 103973, 713040, 5352729, 43645848, 384059537, 3626960272, 36585357429, 392545057280, 4463791225145, 53622168102640, 678508544425721, 9020035443775264, 125684948107190045, 1831698736650660952, 27866044704218390113
Offset: 1

Views

Author

Floor van Lamoen, Jul 11 2001

Keywords

Examples

			The array begins:
   1   2   1  13   1
   1   3  10  14
   5   6  25
   1  34
  40
		

Crossrefs

Programs

  • Maple
    T:= proc(n, k) option remember;
          if n<1 or k<1 then 0
        elif n=1 and irem(k, 2)=1 or k=1 and irem(n, 2)=0 then 1
        elif irem(n+k, 2)=0 then T(n-1, k+1)+T(n-1, k)+T(n-2, k)
                            else T(n+1, k-1)+T(n, k-1)+T(n, k-2)
          fi
        end:
    a:= n-> `if`(irem (n, 2)=0, T(1, n), T(n, 1)):
    seq(a(n), n=1..30);  # Alois P. Heinz, Feb 08 2011
  • Mathematica
    T[n_, k_] := T[n, k] = Which[n < 1 || k < 1, 0
         , n == 1 && Mod[k, 2] == 1 || k == 1 && Mod[n, 2] == 0, 1
         , Mod[n + k, 2] == 0, T[n - 1, k + 1] + T[n - 1, k] + T[n - 2, k]
         , True,               T[n + 1, k - 1] + T[n, k - 1] + T[n, k - 2]];
    a[n_] := If[Mod [n, 2] == 0, T[1, n], T[n, 1]];
    Table[a[n], {n, 1, 30}] (* Jean-François Alcover, Mar 11 2022, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Feb 08 2011

A059512 For n>=2, the number of (s(0), s(1), ..., s(n-1)) such that 0 < s(i) < 5 and |s(i) - s(i-1)| <= 1 for i = 1,2,....,n-1, s(0) = 2, s(n-1) = 2.

Original entry on oeis.org

0, 1, 1, 3, 7, 18, 46, 119, 309, 805, 2101, 5490, 14356, 37557, 98281, 257231, 673323, 1762594, 4614226, 12079707, 31624285, 82792161, 216750601, 567457058, 1485616392, 3889385353, 10182528721, 26658183099, 69791991919
Offset: 0

Views

Author

Floor van Lamoen, Jan 21 2001

Keywords

Comments

Substituting x(1-x)/(1-2x) into x/(1-x^2) yields g.f. of sequence.

Crossrefs

a(1-2n)=A005207(2n), a(-2n)=A056014(2n+1).

Programs

  • Mathematica
    CoefficientList[Series[x(1-x)(1-2x)/((1-x-x^2)(1-3x+x^2)), {x,0,30}], x]  (* Harvey P. Dale, Apr 23 2011 *)
  • PARI
    a(n)=(fibonacci(2*n-1)+fibonacci(n-2))/2

Formula

a(n) = 2a(n-1) + Sum{mA000045).
G.f.: x(1-x)(1-2x)/((1-x-x^2)(1-3x+x^2)).
a(n+1)=sum{k=0..floor(n/2), C(n,2k)*F(2k+1)}. [From Paul Barry, Oct 14 2009]

A063179 Di-Boustrophedon transform of (1,0,0,0,...): Fill in an array by diagonals alternating in the 'up' and 'down' directions. The n-th diagonal starts with the n-th element of (1,0,0,0,...). When going in the 'up' direction the next element is the sum of the previous element of the diagonal and the previous two elements of the row the new element is in. When going in the 'down' direction the next element is the sum of the previous element of the diagonal and the previous two elements of the column the new element is in. The final element of the n-th diagonal is a(n).

Original entry on oeis.org

1, 1, 2, 4, 12, 42, 178, 870, 4830, 29976, 205572, 1543210, 12583242, 110725638, 1045664646, 10547679660, 113172039256, 1286925785286, 15459448549274, 195616259182162, 2600506074185090, 36235386548738016, 528084808585261568, 8033872923106040478
Offset: 1

Views

Author

Floor van Lamoen, Jul 09 2001

Keywords

Examples

			Array begins:
   1  1  0  4  0 42 ...
   0  1  3  4 38 ...
   2  2  7 31 ...
   0 10 22 ...
  12 12 ...
   0 ...
		

Crossrefs

Extensions

More terms from Sean A. Irvine, Apr 21 2023

A227862 A boustrophedon triangle.

Original entry on oeis.org

1, 1, 2, 4, 3, 1, 1, 5, 8, 9, 24, 23, 18, 10, 1, 1, 25, 48, 66, 76, 77, 294, 293, 268, 220, 154, 78, 1, 1, 295, 588, 856, 1076, 1230, 1308, 1309, 6664, 6663, 6368, 5780, 4924, 3848, 2618, 1310, 1, 1, 6665, 13328, 19696, 25476, 30400, 34248, 36866, 38176, 38177
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 01 2013

Keywords

Comments

T(n, n * (n mod 2)) = A000667(n).

Examples

			First nine rows:
.  0:                                    1
.  1:                               1   ->  2
.  2:                           4   <-   3  <-  1
.  3:                       1 ->    5 ->   8   ->   9
.  4:                   24  <-  23  <-  18  <-  10  <-  1
.  5:              1  ->  25  ->  48  ->   66 ->   76  ->  77
.  6:          294 <-  293 <-  268 <-  220 <-  154  <-  78   <-  1
.  7:      1  ->  295 ->  588 ->  856 -> 1076 -> 1230 -> 1308 -> 1309
.  8:  6664 <- 6663 <- 6368 <- 5780 <- 4924 <- 3848 <- 2618 <- 1310  <- 1 .
		

Crossrefs

Cf. A008280.

Programs

  • Haskell
    a227862 n k = a227862_tabl !! n !! k
    a227862_row n = a227862_tabl !! n
    a227862_tabl = map snd $ iterate ox (False, [1]) where
       ox (turn, xs) = (not turn, if turn then reverse ys else ys)
          where ys = scanl (+) 1 (if turn then reverse xs else xs)
  • Mathematica
    T[0, 0] = 1; T[n_?OddQ, 0] = 1; T[n_?EvenQ, n_] = 1; T[n_, k_] /; 0 <= k <= n := T[n, k] = If[OddQ[n], T[n, k - 1] + T[n - 1, k - 1], T[n, k + 1] + T[n - 1, k]]; T[, ] = 0;
    Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jul 23 2019 *)

A059513 Variation of Boustrophedon transform applied to 1,1,1,1,... Fill an array by diagonals, in alternating directions. The first entry is 1 each time. For the next element of a diagonal, add to the previous element the elements of the row and the column the new element is in. The final element of each diagonal gives a(n).

Original entry on oeis.org

1, 2, 6, 23, 116, 736, 5659, 50796, 521040, 6006587, 76874524, 1081439062, 16586149365, 275442822510, 4924040788654
Offset: 1

Views

Author

Floor van Lamoen, Jan 23 2001

Keywords

Examples

			The array begins
1 ....2 ...1 ..23 ..1 ...
1 ....4 ..19 ..48 ...
6 ...13 ..87 ...
1 ..107 ...
116 ...
1 ...
		

Crossrefs

A059574 The array described in A059513 read by antidiagonals in the 'up' direction.

Original entry on oeis.org

1, 1, 2, 6, 4, 1, 1, 13, 19, 23, 116, 107, 87, 48, 1, 1, 243, 458, 635, 708, 736, 5659, 5533, 5163, 4239, 2967, 1517, 1, 1, 11562, 22824, 33291, 41772, 47733, 50031, 50796, 521040, 515254, 497789, 452016, 385422, 301161, 204598, 103125, 1
Offset: 1

Views

Author

Floor van Lamoen, Jan 23 2001

Keywords

Crossrefs

A292756 Expansion of e.g.f. exp(x)*(tan(x)+sec(x))^2.

Original entry on oeis.org

1, 3, 9, 29, 105, 433, 2029, 10709, 63025, 409713, 2917749, 22599389, 189200745, 1702839193, 16397919469, 168248900069, 1832540103265, 21118133619873, 256725609081189, 3283461599832749, 44074814323890585, 619564244562907753, 9102144892897546909, 139495284063955397429
Offset: 0

Views

Author

N. J. A. Sloane, Sep 26 2017

Keywords

Crossrefs

Cf. A000667.

Programs

  • Mathematica
    nmax = 20; CoefficientList[Series[Exp[x]*(Tan[x]+Sec[x])^2, {x, 0, nmax}], x] * Range[0, nmax]! (* Vaclav Kotesovec, Jun 02 2019 *)

Formula

a(n) ~ 2^(n + 9/2) * n^(n + 3/2) / (Pi^(n + 3/2) * exp(n - Pi/2)). - Vaclav Kotesovec, Jun 02 2019
Previous Showing 11-20 of 37 results. Next