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 21-28 of 28 results.

A122438 Riordan array (1/(1-2x), x(1+2x)).

Original entry on oeis.org

1, 2, 1, 4, 4, 1, 8, 8, 6, 1, 16, 16, 16, 8, 1, 32, 32, 32, 28, 10, 1, 64, 64, 64, 64, 44, 12, 1, 128, 128, 128, 128, 120, 64, 14, 1, 256, 256, 256, 256, 256, 208, 88, 16, 1, 512, 512, 512, 512, 512, 496, 336, 116, 18, 1, 1024, 1024, 1024, 1024, 1024, 1024, 912, 512, 148
Offset: 0

Views

Author

Paul Barry, Sep 05 2006

Keywords

Comments

Generalized Whitney triangle. Row sums are A045883(n+1). Diagonal sums are A122439.

Examples

			Number triangle begins
1,
2, 1,
4, 4, 1,
8, 8, 6, 1,
16, 16, 16, 8, 1,
32, 32, 32, 28, 10, 1,
64, 64, 64, 64, 44, 12, 1
		

Crossrefs

Cf. A004070.

Programs

  • Mathematica
    T[n_, k_] := Sum[ Binomial[k, n - k - j]*2^(n - k), {j, 0, n - k}]; Table[ T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Robert G. Wilson v, Sep 14 2006 *)

Formula

Number triangle T(n,k)=sum{j=0..n-k, C(k,n-k-j)}*2^(n-k).

Extensions

More terms from Robert G. Wilson v, Sep 14 2006

A102841 a(n) = ((9*n^2 + 33*n + 26)*2^n + (-1)^n)/27.

Original entry on oeis.org

1, 5, 19, 61, 179, 493, 1299, 3309, 8211, 19949, 47635, 112109, 260627, 599533, 1366547, 3089901, 6937107, 15476205, 34331155, 75769325, 166451731, 364127725, 793500179, 1723082221, 3729512979, 8048092653, 17319057939
Offset: 0

Views

Author

Creighton Dement, Feb 27 2005

Keywords

Comments

A floretion-generated sequence relating the number of edges and faces in n-dimensional hypercube.
Equals A001787, (1, 4, 12, 32, 80, ...) convolved with A001045, the Jacobsthal sequence. - Gary W. Adamson, May 23 2009
The sum of the sizes of all inversions in compositions of n. - Arnold Knopfmacher, Jan 22 2020

Crossrefs

Programs

  • Magma
    [((9*n^2 + 33*n + 26)*2^n + (-1)^n)/27 : n in [0..40]]; // Wesley Ivan Hurt, Jul 03 2020
  • Mathematica
    Table[(1/27)*((9 n^2 + 33 n + 26) 2^n + (-1)^n), {n, 0, 50}] (* or *) LinearRecurrence[{5,-6,-4,8}, {1,5,19,61}, 50] (* G. C. Greubel, Sep 27 2017 *)

Formula

G.f.: 1/((1+x)*(1-2*x)^3).
a(n+1) - 2*a(n) = A045883(n+2).
a(n) + a(n+1) = A001788(n+2).
a(n) = 5*a(n-1) - 6*a(n-2) - 4*a(n-3) + 8*a(n-4). - Wesley Ivan Hurt, Jul 03 2020

Extensions

Corrected by T. D. Noe, Nov 08 2006

A225114 Number of skew partitions of n whose diagrams have no empty rows and columns.

Original entry on oeis.org

1, 1, 3, 9, 28, 87, 272, 850, 2659, 8318, 26025, 81427, 254777, 797175, 2494307, 7804529, 24419909, 76408475, 239077739, 748060606, 2340639096, 7323726778, 22915525377, 71701378526, 224349545236, 701976998795, 2196446204672, 6872555567553, 21503836486190, 67284284442622, 210528708959146
Offset: 0

Views

Author

Joerg Arndt, Apr 29 2013

Keywords

Comments

A skew partition S of size n is a pair of partitions [p1,p2] where p1 is a partition of the integer n1, p2 is a partition of the integer n2, p2 is an inner partition of p1, and n=n1-n2. We say that p1 and p2 are respectively the inner and outer partitions of S. A skew partition can be depicted by a diagram made of rows of cells, in the same way as a partition. Only the cells of the outer partition p1 which are not in the inner partition p2 appear in the picture. [from the Sage manual, see links]

Examples

			The a(4)=28 skew partitions of 4 are
01:  [[4], []]
02:  [[3, 1], []]
03:  [[4, 1], [1]]
04:  [[2, 2], []]
05:  [[3, 2], [1]]
06:  [[4, 2], [2]]
07:  [[2, 1, 1], []]
08:  [[3, 2, 1], [1, 1]]
09:  [[3, 1, 1], [1]]
10:  [[4, 2, 1], [2, 1]]
11:  [[3, 3], [2]]
12:  [[4, 3], [3]]
13:  [[2, 2, 1], [1]]
14:  [[3, 3, 1], [2, 1]]
15:  [[3, 2, 1], [2]]
16:  [[4, 3, 1], [3, 1]]
17:  [[2, 2, 2], [1, 1]]
18:  [[3, 3, 2], [2, 2]]
19:  [[3, 2, 2], [2, 1]]
20:  [[4, 3, 2], [3, 2]]
21:  [[1, 1, 1, 1], []]
22:  [[2, 2, 2, 1], [1, 1, 1]]
23:  [[2, 2, 1, 1], [1, 1]]
24:  [[3, 3, 2, 1], [2, 2, 1]]
25:  [[2, 1, 1, 1], [1]]
26:  [[3, 2, 2, 1], [2, 1, 1]]
27:  [[3, 2, 1, 1], [2, 1]]
28:  [[4, 3, 2, 1], [3, 2, 1]]
		

Programs

  • PARI
    \\ The following program is significantly faster.
    A225114(n)=
    {
        my( C=vector(n, j, 1) );
        my(m=n, z, t, ret);
        while ( 1,  /* for all compositions C[1..m] of n */
    \\        print( vector(m, n, C[n] ) ); /* print composition */
            t = prod(j=2,m, min(C[j-1], C[j]) + 1 );  /* A225114 */
    \\        t = prod(j=2,m, min(C[j-1], C[j]) + 0 );  /* A006958 */
    \\        t = prod(j=2,m, C[j-1] + C[j] + 0 );  /* A059716 */
    \\        t = prod(j=2,m, C[j-1] + C[j] + 1 );  /* A187077 */
    \\        t = sum(j=2,m, C[j-1] > C[j] );  /* A045883 */
            ret += t;
            if ( m<=1, break() ); /* last composition? */
            /* create next composition: */
            C[m-1] += 1;
            z = C[m];
            C[m] = 1;
            m += z - 2;
        );
        return(ret);
    }
    for (n=0, 30, print1(A225114(n),", "));
    \\ Joerg Arndt, Jul 09 2013
  • Sage
    [SkewPartitions(n).cardinality() for n in range(16)]
    

Formula

Conjectured g.f.: 1/(2 - 1/(1 - x/(1 - x/(1 - x^2/(1 - x^2/(1 - x^3/(1 - x^3/(1 - ...)))))))). - Mikhail Kurkov, Sep 03 2024

Extensions

Edited by Max Alekseyev, Dec 22 2015

A248810 Signed version of A164984.

Original entry on oeis.org

1, -1, 1, 3, -3, 1, -5, 9, -5, 1, 11, -23, 19, -7, 1, -21, 57, -61, 33, -9, 1, 43, -135, 179, -127, 51, -11, 1, -85, 313, -493, 433, -229, 73, -13, 1, 171, -711, 1299, -1359, 891, -375, 99, -15, 1, -341, 1593, -3309, 4017, -3141, 1641, -573, 129, -17, 1, 683, -3527, 8211, -11343, 10299, -6423, 2787, -831, 163, -19, 1
Offset: 0

Views

Author

Derek Orr, Oct 14 2014

Keywords

Comments

Consider the transformation 1 + x + x^2 + x^3 + ... + x^n = A_0*(x+2)^0 + A_1*(x+2)^1 + A_2*(x+2)^2 + ... + A_n*(x+2)^n. This sequence gives A_0, ... A_n as the entries in the n-th row of this triangle, starting at n = 0.

Examples

			1;
-1,      1;
3,      -3,     1;
-5,      9,    -5,      1;
11,    -23,    19,     -7,     1;
-21,    57,   -61,     33,    -9,     1;
43,   -135,   179,   -127,    51,   -11,    1;
-85,   313,  -493,    433,  -229,    73,  -13,    1;
171,  -711,  1299,  -1359,   891,  -375,   99,  -15,   1;
-341, 1593, -3309,   4017, -3141,  1641, -573,  129, -17,   1;
683, -3527,  8211, -11343, 10299, -6423, 2787, -831, 163, -19, 1;
		

Crossrefs

Programs

  • PARI
    for(n=0,20,for(k=0,n,print1(1/k!*sum(i=0,n,((-2)^(i-k)*prod(j=0,k-1,i-j))),", ")))

Formula

T(n,n-1) = -2*n+1 for n > 0.
T(n,n-2) = 2*(n-1)^2+1 for n > 1.
T(n,0) = A077925(n).
T(n,1) = (-1)^(n+1)*A045883(n).
Rows with odd n sum to 0.
Rows with even n sum to 1.

A348407 a(n) = ((n+1)*3*2^(n+1) + 29*2^n + (-1)^n)/9.

Original entry on oeis.org

4, 9, 21, 47, 105, 231, 505, 1095, 2361, 5063, 10809, 22983, 48697, 102855, 216633, 455111, 953913, 1995207, 4165177, 8679879, 18058809, 37515719, 77827641, 161247687, 333680185, 689729991, 1424199225, 2937876935, 6054710841, 12467335623, 25650499129, 52732654023, 108328619577
Offset: 0

Views

Author

Paul Curtz and Thomas Scheuerle, Oct 17 2021

Keywords

Comments

The ratio (count of ones)/(count of zeros) in the binary expansion of a(n) is > 1/2 and <= 5 for all n > 0, this is because the division by 9 adds a repeating pattern 111000... after some binary digits.
This sequence has in its "partial binomial transform" (see formula section) no other constants than 2 and 1 despite of its more complicated looking closed form expression. This transform has a deep connection to the Grünwald-Letnikov fractional derivative if we replace the order of the derivative with the variable x: D^x*f(x).

Crossrefs

Programs

  • Mathematica
    Array[((# + 1)*3*2^(# + 1) + 29*2^# + (-1)^#)/9 &, 33, 0] (* Michael De Vlieger, Oct 19 2021 *)
    LinearRecurrence[{3,0,-4},{4,9,21},40] (* Harvey P. Dale, Aug 12 2023 *)

Formula

a(n) = round(((n+1)*3*2^(n+1) + 29*2^n)/9).
a(n) = 2^(n+2) + A113861(n).
a(n) = 2^(n+2) + n*2^n - A045883(n) = 2^(n+2) + n*2^n - round(((3*n+1)*2^n)/9).
a(n+1) - 2*a(n) = A001045(n+2).
a(n) = A034007(n+3) + A045883(n-1) for n > 0.
A partial binomial transform in two parts:
(Partial means a diagonal in a difference table a(0), a(2)-a(1), ... . This is partial because one diagonal alone is no invertible transform.)
A001787(n+2) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(2*n-k)
= (n+2)*2^(n+1).
A052951(n+1) = Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*(a(1+2*n-k) - a(2*n-k))
= (n+2)*2^(n+1) + 2^n.
The inverse transform:
a(n+1) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*(k+2)*2^(k+1)
+ Sum_{k=0..floor((n-1)/2)} binomial(n-k-1, k)*((k+2)*2^(k+1) + 2^k).
From Stefano Spezia, Oct 20 2021: (Start)
G.f.: (4 - 3*x - 6*x^2)/((1 + x)*(1 - 2*x)^2).
a(n) = 3*a(n-1) - 4*a(n-3) for n > 2. (End)

A191007 a(n) = n*2^(n+1) + (2^(n+3)+(-1)^n)/3.

Original entry on oeis.org

3, 9, 27, 69, 171, 405, 939, 2133, 4779, 10581, 23211, 50517, 109227, 234837, 502443, 1070421, 2271915, 4805973, 10136235, 21321045, 44739243, 93672789, 195734187, 408245589, 850045611, 1767200085, 3668617899, 7605671253, 15748213419, 32570168661, 67287820971
Offset: 0

Views

Author

Edward Omey, Jun 16 2011

Keywords

Comments

Another renewal type of sequence: Let X, X(1),X(2),... denote independent random variables with pdf P(X=1) = P(X=2) = P(X=4) = 1/3. Let N(x) denote the first value of k such that X(1)*X(2)...*X(k) > x, and let H(x) = E(N(x)). The sequence a(n) is given by a(n) = 2^(n+1)*H(2^n).

Crossrefs

3 times A045883.

Programs

  • Magma
    [n*2^(n+1)+(2^(n+3)+(-1)^n)/3: n in [0..30]]; // Vincenzo Librandi, Oct 16 2014
  • Mathematica
    Table[n 2^(n + 1) + (2^(n + 3) + (-1)^n)/3, {n, 0, 70}] (* Vincenzo Librandi, Oct 16 2014 *)
    LinearRecurrence[{3,0,-4},{3,9,27},40] (* Harvey P. Dale, Feb 11 2024 *)
  • PARI
    a(n) = n*2^(n+1) + (2^(n+3)+(-1)^n)/3; \\ Michel Marcus, Oct 16 2014
    

Formula

a(n) = n*2^(n+1) + (2^(n+3)+(-1)^n)/3.
a(n) = 3 * A045883(n+1).
G.f.: 3/((1 + x)*(1 - 2*x)^2). [Bruno Berselli, Oct 16 2014]

Extensions

Formula corrected and more terms from Michel Marcus, Oct 16 2014

A246798 Triangle read by rows: T(n,k) is the coefficient A_k in the transformation Sum_{k=0..n} (k+1)*x^k = Sum_{k=0..n} A_k*(x+3)^k.

Original entry on oeis.org

1, -5, 2, 22, -16, 3, -86, 92, -33, 4, 319, -448, 237, -56, 5, -1139, 1982, -1383, 484, -85, 6, 3964, -8224, 7122, -3296, 860, -120, 7, -13532, 32600, -33702, 19384, -6700, 1392, -161, 8, 45517, -124864, 150006, -103088, 44330, -12216, 2107, -208, 9, -151313, 465626, -637314, 509272, -261850, 89844, -20573, 3032, -261, 10
Offset: 0

Views

Author

Derek Orr, Nov 15 2014

Keywords

Comments

Consider the transformation 1 + 2x + 3x^2 + 4x^3 + ... + (n+1)*x^n = A_0*(x+3)^0 + A_1*(x+3)^1 + A_2*(x+3)^2 + ... + A_n*(x+3)^n. This sequence gives A_0, ... A_n as the entries in the n-th row of this triangle, starting at n = 0.

Examples

			Triangle starts:
1;
-5,           2;
22,         -16,       3;
-86,         92,     -33,       4;
319,       -448,     237,     -56,       5;
-1139,     1982,   -1383,     484,     -85,      6;
3964,     -8224,    7122,   -3296,     860,   -120,      7;
-13532,   32600,  -33702,   19384,   -6700,   1392,   -161,    8;
45517,  -124864,  150006, -103088,   44330, -12216,   2107, -208,    9;
-151313, 465626, -637314,  509272, -261850,  89844, -20573, 3032, -261, 10;
...
		

Crossrefs

Programs

  • PARI
    T(n, k) = (k+1)*sum(i=0, n-k, (-3)^i*binomial(i+k+1, k+1))
    for(n=0, 10, for(k=0, n, print1(T(n, k), ", ")))

Formula

T(n,0) = (1-(4*n+5)*(-3)^(n+1))/16, for n >= 0.
T(n,n-1) = -n*(3*n+2), for n >= 1.
Row n sums to (-1)^n*A045883(n+1) = T(n,0) of A246788.

A352692 a(n) + a(n+1) = 2^n for n >= 0 with a(0) = 4.

Original entry on oeis.org

4, -3, 5, -1, 9, 7, 25, 39, 89, 167, 345, 679, 1369, 2727, 5465, 10919, 21849, 43687, 87385, 174759, 349529, 699047, 1398105, 2796199, 5592409, 11184807, 22369625, 44739239, 89478489, 178956967, 357913945, 715827879, 1431655769, 2863311527, 5726623065, 11453246119, 22906492249
Offset: 0

Views

Author

Paul Curtz, Mar 29 2022

Keywords

Comments

Difference table D(n,k) = D(n-1,k+1) - D(n-1,k), D(0,k) = a(k):
4, -3, 5, -1, 9, 7, 25, ...
-7, 8, -6, 10, -2, 18, 14, 50, ...
15, -14, 16, -12, 20, -4, 36, 28, 100, ...
-29, 30, -28, 32, -24, 40, -8, 72, 56, 200, ...
59, -58, 60, -56, 64, -48, 80, -16, 144, 112, 400, ...
...
The diagonals are given by D(n,n+k) = a(k)*2^n.
D(n,1) = -(-1)^n* A340627(n).
a(n) - a(n) = 0, 0, 0, 0, 0, ... (trivially)
a(n+1) + a(n) = 1, 2, 4, 8, 16, ... = 2^n (by definition)
a(n+2) - a(n) = 1, 2, 4, 8, 16, ... = 2^n
a(n+3) + a(n) = 3, 6, 12, 24, 48, ... = 2^n*3
a(n+4) - a(n) = 5, 10, 20, 40, 80, ... = 2^n*5
a(n+5) + a(n) = 11, 22, 44, 88, 176, ... = 2^n*11
(...)
This table is given by T(r,n) = A001045(r)*2^n with r, n >= 0.
Sums of antidiagonals are A045883(n).
Main diagonal: A192382(n).
First upper diagonal: A054881(n+1).
First subdiagonal: A003683(n+1).
Second subdiagonal: A246036(n).
Now consider the array from c(n) = (-1)^n*a(n) with its difference table:
4, 3, 5, 1, 9, -7, 25, -39, ... = c(n)
-1, 2, -4, 8, -16, 32, -64, 128, ... = -A122803(n)
3, -6, 12, -24, 48, -96, 192, -384, ... =
-9, 18, -36, 72, -144, 288, -576, 1152, ...
27, -54, 108, -216, 432, -864, 1728, -3456, ...
...
The first subdiagonal is -A000400(n). The second is A169604(n).

Crossrefs

If a(0) = k then A001045 (k=0), A078008 (k=1), A140966 (k=2), A154879 (k=3), this sequence (k=4).
Essentially the same as A115335.

Programs

  • Maple
    a := proc(n) option remember; ifelse(n = 0, 4, 2^(n-1) - a(n-1)) end: # Peter Luschny, Mar 29 2022
    A352691 := proc(n)
        (11*(-1)^n + 2^n)/3
    end proc: # R. J. Mathar, Apr 26 2022
  • Mathematica
    LinearRecurrence[{1, 2}, {4, -3}, 40] (* Amiram Eldar, Mar 29 2022 *)
  • PARI
    a(n) = (11*(-1)^n + 2^n)/3; \\ Thomas Scheuerle, Mar 29 2022

Formula

abs(a(n)) = A115335(n-1) for n >= 1.
a(3*n) - (-1)^n*4 = A132805(n).
a(3*n+1) + (-1)^n*4 = A082311(n).
a(3*n+2) - (-1)^n*4 = A082365(n).
From Thomas Scheuerle, Mar 29 2022: (Start)
G.f.: (-4 + 7*x)/(-1 + x + 2*x^2).
Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(m + 2*n-k) = a(m)*2^n.
Sum_{k=0..n} (-1)^(n-k)*binomial(n, k)*a(1 + n-k) = -(-1)^n*A340627(n).
a(n) = (11*(-1)^n + 2^n)/3.
a(n + 2*m) = a(n) + A002450(m)*2^n.
a(2*n) = A192382(n+1) + (-1)^n*a(n).
a(n) = ( A045883(n) - Sum_{k=0..n-1}(-1)^k*a(k) )/n, for n > 0. (End)
a(n) = A001045(n) + 4*(-1)^n.
a(n+1) = 2*a(n) -11*(-1)^n.
a(n+2) = a(n) + 2^n.
a(n+4) = a(n) + A020714(n).
a(n+6) = a(n) + A175805(n).
a(2*n) = A163868(n).
a(2*n+1) = (2^(2*n+1) - 11)/3.

Extensions

Warning: The DATA is correct, but there may be errors in the COMMENTS, which should be rechecked. - Editors of OEIS, Apr 26 2022
Edited by M. F. Hasler, Apr 26 2022.
Previous Showing 21-28 of 28 results.