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

A262710 Powers of -4.

Original entry on oeis.org

1, -4, 16, -64, 256, -1024, 4096, -16384, 65536, -262144, 1048576, -4194304, 16777216, -67108864, 268435456, -1073741824, 4294967296, -17179869184, 68719476736, -274877906944, 1099511627776, -4398046511104, 17592186044416, -70368744177664, 281474976710656
Offset: 0

Views

Author

L. Van Warren, Sep 28 2015

Keywords

Comments

Purely real values from the sequence generated by (1 + i)^k where i = sqrt(-1) and k is a real nonnegative integer.
This sequence gives the values of (1 + i)^k when k is a multiple of 4. When k = 2 mod 4, (1 + i)^k is purely imaginary, and when k is odd, (1 + i)^k has both a real and an imaginary part, and abs(Re((1 + i)^k)) = abs(Im((1 + i)^k)).

Crossrefs

Programs

  • Magma
    [(-1)^n*4^n: n in [0..30]]; // Vincenzo Librandi, Oct 06 2015
  • Mathematica
    (-4)^Range[0, 15] (* Alonso del Arte, Mar 16 2016 *)
  • PARI
    vector(100, n, n--; (-4)^n) \\ Altug Alkan, Oct 05 2015
    
  • PARI
    Vec(1/(1+4*x) + O(x^30)) \\ Michel Marcus, Oct 06 2015
    
  • PARI
    lista(nn) = for (n=0, nn, z = (1+I)^n; if (imag(z)==0, print1(real(z), ", "))); \\ Michel Marcus, Nov 01 2015
    

Formula

a(n) = (-4)^n.
G.f.: 1/(1 + 4 * x).
E.g.f.: exp(-4*x). - Alejandro J. Becerra Jr., Jan 28 2021
a(n) = Sum_{k=0..2*n} (-1)^k*binomial(4*n, 2*k) (see Nunn, p. 9). - Stefano Spezia, Dec 28 2021

A284861 Triangle read by rows: T(n, k) = S2[3,1](n, k)*k! with the Sheffer triangle S2[3,1] = (exp(x), exp(3*x) -1) given in A282629.

Original entry on oeis.org

1, 1, 3, 1, 15, 18, 1, 63, 216, 162, 1, 255, 1890, 3564, 1944, 1, 1023, 14760, 52650, 68040, 29160, 1, 4095, 109458, 659340, 1516320, 1487160, 524880, 1, 16383, 790776, 7578522, 27624240, 46539360, 36741600, 11022480, 1, 65535, 5633730, 82902204, 450057384, 1158993360, 1535798880, 1014068160, 264539520
Offset: 0

Views

Author

Wolfdieter Lang, Apr 09 2017

Keywords

Comments

This is a generalization of triangle A131689(n, k) = Stirling2(n, k)*k!, because S2[3,1] is a generalization of the Stirling2 triangle written as S2[1,0].
This triangle appears in the o.g.f. G(3,1;n,x) of the powers {(1+3*m)^n}{m>=0} as G(3,1;n,x) = Sum{k>=0..n} T(n, k)*x^k / (1-x)^k.
This triangle is also related to the generalized row reversed Euler triangle rEu[3,1] with row polynomial rEu(3,1;n,x) = Sum_{m=0..n} rEu(3,1;n,m)*x^m with rEu(3,1;n,m) = Sum_{j=0..m} (-1)^(m-j)*binomial(n-j, m-j)*T(n, m). This follows from the above given o.g.f. of powers G(3,1;n,x) = rEu(3,1;n,x)/(1-x)^(n+1). The Euler triangle E[3,1] (row reversed rEu[3,1] is given in A225117. See a formula below.
The e.g.f. of the row polynomials R(3,1;n,x) = Sum_{m=0..n} T(n, m)*x^m follows from the e.g.f. of the row polynomials of the Sheffer triangle A282629. See the formula section.
The diagonal sequence is A032031(k) = k!*3^k.
The row sums give unsigned A151919, and the alternating row sums give A122803.
The first column k sequences divided by A032031(k) are A000012, A002450 (with a leading 0), A016223, A021874. For the e.g.f.s and o.g.f.s see below.

Examples

			The triangle T(n, k) begins
n\k 0     1      2       3        4        5        6        7 ...
0:  1
1:  1     3
2:  1    15     18
3:  1    63    216     162
4:  1   255   1890    3564     1944
5:  1  1023  14760   52650    68040    29160
6:  1  4095 109458  659340  1516320  1487160   524880
7:  1 16383 790776 7578522 27624240 46539360 36741600 11022480
...
row n=8: 1 65535 5633730 82902204 450057384 1158993360 1535798880 1014068160 264539520,
row n=9: 1 262143 39829320 879725610 6845572440 25294754520 50042059200 54561276000 30951123840 7142567040,
row n=10: 1 1048575 280378098 9155719980 99549149040 507399658920 1406104706160 2251231315200 2083248720000 1035672220800 214277011200.
------------------------------------------------------------------
T(2, 1) =  -1 + 4^2 = 15 = 2*A225117(2,2) + 1*A225117(2,1) = 2*1 + 1*13.
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[Binomial[k, m] (-1)^(k - m) (1 + 3m)^n, {m, 0, k}], {n, 0, 10}, {k, 0, n}]// Flatten (* Indranil Ghosh, Apr 09 2017 *)
  • PARI
    for(n=0, 10, for(k=0, n, print1(sum(m=0, k, binomial(k, m) * (-1)^(k - m)*(1 + 3*m)^n),", "); ); print();) \\ Indranil Ghosh, Apr 09 2017
    
  • Python
    # Indranil Ghosh, Apr 09 2017
    from sympy import binomial
    for n in range(11):
        print([sum([binomial(k, m)*(-1)**(k - m)*(1 + 3*m)**n for m in range(k + 1)]) for k in range(n + 1)])

Formula

E.g.f. of the row polynomials R(n, x) (see a comment above) is exp(z)/(1 - x*(exp(3*z) - 1)). This is the e.g.f. for the triangle.
T(n, k) = Sum_{m=0..k} binomial(k, m)*(-1)^(k-m)*(1+ 3*m)^n, 0 <= k <= n.
T(n, k) = Sum_{m=0..k} binomial(n-m, k-m)*A225117(n,n-m), 0 <= k <= n.
Three term recurrence: T(n, k) = 0 if n < k, T(n,-1) = 0, T(0, 0) = 1, T(n, k) = 3*k*T(n-1, k-1) + (1+3*k)*T(n-1, k) for n >= 1. See A282629.
The column k sequence has e.g.f. exp(x)*(exp(3*x) - 1)^k (from the Sheffer property of A282629).
The o.g.f. is A032031(k)*x^k/Product_{j=0..k} (1 - (1+3*j)*x).
From Peter Bala, Jan 12 2018: (Start)
n-th row polynomial R(n,x) = (1 + 3*x) o (1 + 3*x) o ... o (1 + 3*x) (n factors), where o denotes the black diamond multiplication operator of Dukes and White. See example E14 in the Bala link. Cf. A145901.
R(n,x) = Sum_{k = 0..n} binomial(n,k)*3^k*F(k,x) where F(k,x) is the Fubini polynomial of order k, the k-th row polynomial of A019538. (End)

A307047 Square array A(n,k), n >= 0, k >= 1, read by antidiagonals, where column k is the expansion of g.f. 1/((1+x)^k-x^k).

Original entry on oeis.org

1, 1, 0, 1, -2, 0, 1, -3, 4, 0, 1, -4, 6, -8, 0, 1, -5, 10, -9, 16, 0, 1, -6, 15, -20, 9, -32, 0, 1, -7, 21, -35, 36, 0, 64, 0, 1, -8, 28, -56, 70, -64, -27, -128, 0, 1, -9, 36, -84, 126, -125, 120, 81, 256, 0, 1, -10, 45, -120, 210, -252, 200, -240, -162, -512, 0
Offset: 0

Views

Author

Seiichi Manyama, Mar 21 2019

Keywords

Examples

			Square array begins:
   1,    1,    1,    1,    1,    1,     1,     1, ...
   0,   -2,   -3,   -4,   -5,   -6,    -7,    -8, ...
   0,    4,    6,   10,   15,   21,    28,    36, ...
   0,   -8,   -9,  -20,  -35,  -56,   -84,  -120, ...
   0,   16,    9,   36,   70,  126,   210,   330, ...
   0,  -32,    0,  -64, -125, -252,  -462,  -792, ...
   0,   64,  -27,  120,  200,  463,   924,  1716, ...
   0, -128,   81, -240, -275, -804, -1715, -3432, ...
   0,  256, -162,  496,  275, 1365,  2989,  6436, ...
		

Crossrefs

Columns 1-7 give A000007, A122803, A000748, (-1)^n * A000749(n+3), A000750, A006090, A049018.
Cf. A039912 (square array A(n,k), n >= 0, k >= 2), A306913, A306914, A306915.

Programs

  • Mathematica
    T[n_, k_] := (-1)^n * Sum[(-1)^(j * Mod[k, 2]) * Binomial[n + k - 1, k*j + k - 1], {j, 0, Floor[n/k]}]; Table[T[n - k, k], {n, 0, 11}, {k, n, 1, -1}] // Flatten (* Amiram Eldar, May 20 2021 *)

Formula

A(n,k) = (-1)^n * Sum_{j=0..floor(n/k)} (-1)^((k mod 2) * j) * binomial(n+k-1,k*j+k-1).

A010726 Period 2: repeat (6,10).

Original entry on oeis.org

6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10, 6, 10
Offset: 0

Views

Author

Keywords

Comments

From Klaus Brockhaus, Dec 10 2009: (Start)
Interleaving of A010722 and A010692.
Also continued fraction expansion of 3 + 4*sqrt(15)/5.
Binomial transform of 6 followed by A122803 without initial terms 1,-2.
Inverse binomial transform of A171494. (End)

Crossrefs

Equals 2*A010703. Cf. A010722 (all 6's sequence), A010692 (all 10's sequence), A122803 (powers of -2), A171494. - Klaus Brockhaus, Dec 10 2009

Programs

Formula

a(n) = -2*(-1)^n + 8. - Paolo P. Lava, Oct 27 2006
From Klaus Brockhaus, Dec 10 2009: (Start)
a(n) = a(n-2) for n > 1; a(0) = 6, a(1) = 10.
G.f.: 2*(3+5*x)/((1-x)*(1+x)). (End)

A306913 Square array A(n,k), n >= 0, k >= 1, read by antidiagonals, where column k is the expansion of g.f. 1/((1+x)^k+x^k).

Original entry on oeis.org

1, 1, -2, 1, -2, 4, 1, -3, 2, -8, 1, -4, 6, 0, 16, 1, -5, 10, -11, -4, -32, 1, -6, 15, -20, 21, 8, 64, 1, -7, 21, -35, 34, -42, -8, -128, 1, -8, 28, -56, 70, -48, 85, 0, 256, 1, -9, 36, -84, 126, -127, 48, -171, 16, -512, 1, -10, 45, -120, 210, -252, 220, 0, 342, -32, 1024
Offset: 0

Views

Author

Seiichi Manyama, Mar 16 2019

Keywords

Examples

			Square array begins:
      1,  1,    1,    1,    1,    1,     1,     1, ...
     -2, -2,   -3,   -4,   -5,   -6,    -7,    -8, ...
      4,  2,    6,   10,   15,   21,    28,    36, ...
     -8,  0,  -11,  -20,  -35,  -56,   -84,  -120, ...
     16, -4,   21,   34,   70,  126,   210,   330, ...
    -32,  8,  -42,  -48, -127, -252,  -462,  -792, ...
     64, -8,   85,   48,  220,  461,   924,  1716, ...
   -128,  0, -171,    0, -385, -780, -1717, -3432, ...
    256, 16,  342, -164,  715, 1209,  3017,  6434, ...
		

Crossrefs

Columns 1-2 give A122803, A108520.

Programs

  • Mathematica
    A[n_, k_] := (-1)^n * Sum[(-1)^(Mod[k+1, 2] * j) * Binomial[n + k - 1, k*j + k - 1], {j, 0, Floor[n/k]}]; Table[A[n - k, k], {n, 0, 11}, {k, n, 1, -1}] // Flatten (* Amiram Eldar, May 25 2021 *)

Formula

A(n,k) = (-1)^n * Sum_{j=0..floor(n/k)} (-1)^(((k+1) mod 2) * j) * binomial(n+k-1,k*j+k-1).

A386700 a(n) = Sum_{k=0..n} (-3)^(n-k) * binomial(3*n,k).

Original entry on oeis.org

1, 0, 6, 30, 186, 1140, 7116, 44856, 285066, 1823232, 11721726, 75683718, 490429224, 3187723344, 20774505408, 135699314640, 888177411018, 5823660624408, 38245666664994, 251528316024042, 1656338630258826, 10919849458481028, 72068276593960884, 476093333668519872
Offset: 0

Views

Author

Seiichi Manyama, Jul 30 2025

Keywords

Crossrefs

Programs

  • Mathematica
    Table[(-8/9)^n - Binomial[3*n, n]*(-1 + Hypergeometric2F1[1, -2*n, 1 + n, 1/3]), {n, 0, 25}] (* Vaclav Kotesovec, Jul 30 2025 *)
  • PARI
    a(n) = sum(k=0, n, (-3)^(n-k)*binomial(3*n, k));

Formula

a(n) = [x^n] 1/((1+2*x) * (1-x)^(2*n)).
a(n) = Sum_{k=0..n} (-2)^(n-k) * binomial(2*n+k-1,k).
From Vaclav Kotesovec, Jul 30 2025: (Start)
Recurrence: 18*n*(2*n - 1)*(55*n^2 - 175*n + 138)*a(n) = (11605*n^4 - 49410*n^3 + 74243*n^2 - 46014*n + 9720)*a(n-1) + 24*(3*n - 5)*(3*n - 4)*(55*n^2 - 65*n + 18)*a(n-2).
a(n) ~ 3^(3*n + 1/2) / (5 * sqrt(Pi*n) * 2^(2*n)). (End)
G.f.: g/((-2+3*g) * (3-2*g)) where g = 1+x*g^3 is the g.f. of A001764. - Seiichi Manyama, Aug 13 2025
a(n) = Sum_{k=0..n} (-2)^k * 3^(n-k) * binomial(3*n,k) * binomial(3*n-k-1,n-k). - Seiichi Manyama, Aug 15 2025
G.f.: 1/(1 - 6*x*g^2*(-1+g)) where g = 1+x*g^3 is the g.f. of A001764. - Seiichi Manyama, Aug 17 2025

A118405 Row sums of triangle A118404.

Original entry on oeis.org

1, 0, 0, -2, 4, -6, 12, -26, 52, -102, 204, -410, 820, -1638, 3276, -6554, 13108, -26214, 52428, -104858, 209716, -419430, 838860, -1677722, 3355444, -6710886, 13421772, -26843546, 53687092, -107374182, 214748364, -429496730, 858993460, -1717986918, 3435973836, -6871947674
Offset: 0

Views

Author

Paul D. Hanna, Apr 27 2006

Keywords

Crossrefs

Programs

  • Maple
    seq(coeff(series((1+x)^2/(1+x^2)/(1+2*x),x,n+1), x, n), n = 0 .. 35); # Muniru A Asiru, Oct 31 2018
  • Mathematica
    Total /@ Table[SeriesCoefficient[(-1)^k/((1 + x^2) (1 + x)^(k - 1)), {x, 0, n - k}], {n, 0, 35}, {k, 0, n}] (* Michael De Vlieger, Oct 31 2018 *)
    LinearRecurrence[{-2,-1,-2},{1,0,0},40] (* Harvey P. Dale, Aug 31 2020 *)
  • PARI
    a(n)=polcoeff((1+x)^2/(1+x^2)/(1+2*x+x*O(x^n)),n,x)
    
  • PARI
    a(n)=([0,1,0; 0,0,1; -2,-1,-2]^n*[1;0;0])[1,1] \\ Charles R Greathouse IV, Nov 06 2018

Formula

G.f.: A(x) = (1+x)^2/(1+x^2)/(1+2*x).
From Paul Curtz, Oct 31 2018: (Start)
a(n) + a(n+2) = 1, -2, 4, -8, ... = A122803(n).
a(2n+2) = -2*a(2n+1) = 4*A015521(n). (End)
a(n) = -2a(n-1) - a(n-2) - 2a(n-3). - Charles R Greathouse IV, Nov 06 2018
5*a(n) = (-2)^n + 2*A056594(n-1) + 4*A056594(n). - R. J. Mathar, Jan 27 2021

A141531 Inverse binomial transform of A001651.

Original entry on oeis.org

1, 1, 1, -2, 4, -8, 16, -32, 64, -128, 256, -512, 1024, -2048, 4096, -8192, 16384, -32768, 65536, -131072, 262144, -524288, 1048576, -2097152, 4194304, -8388608, 16777216, -33554432, 67108864, -134217728, 268435456, -536870912, 1073741824, -2147483648
Offset: 0

Views

Author

Paul Curtz, Aug 12 2008

Keywords

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(1+3x+3x^2)/(1+2x),{x,0,40}],x] (* or *) Join[ {1,1},NestList[-2#&,1,38]] (* Harvey P. Dale, May 04 2012 *)
    Join[{1, 1},LinearRecurrence[{-2},{1},32]] (* Ray Chandler, Aug 12 2015 *)
  • PARI
    Vec((1 + 3*x + 3*x^2)/(1 + 2*x) + O(x^40)) \\ Andrew Howroyd, Nov 03 2018

Formula

a(n) = A123344(n+1), n > 0.
a(n) = (-2)^n/4 = (-1)^n*A000079(n-2), n > 1.
O.g.f.: (1 + 3*x + 3*x^2)/(1 + 2*x). - R. J. Mathar, Aug 27 2008
a(n) = -2*a(n-1) for n >= 3; a(0)=1, a(1)=1, a(2)=1. - Harvey P. Dale, May 04 2012
G.f.: x+1/Q(0) where Q(k) = 1 + x*(k+1)/(1 - 1/(1 - (k+1)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Sep 23 2012
G.f.: 1+x/U(0) where U(k) = 1 - x*(k+4) + x*(k+3)/U(k+1); (continued fraction). - Sergei N. Gladkovskii, Oct 11 2012
a(n) = A122803(n-2) for n >= 2. - Georg Fischer, Nov 03 2018
E.g.f.: (3/4) + (3/2)*x + (1/4)*exp(-2*x). - Alejandro J. Becerra Jr., Feb 15 2021

Extensions

Edited and extended by R. J. Mathar, Aug 28 2008

A165872 Totally multiplicative sequence with a(p^e) = (-2)^e.

Original entry on oeis.org

1, -2, -2, 4, -2, 4, -2, -8, 4, 4, -2, -8, -2, 4, 4, 16, -2, -8, -2, -8, 4, 4, -2, 16, 4, 4, -8, -8, -2, -8, -2, -32, 4, 4, 4, 16, -2, 4, 4, 16, -2, -8, -2, -8, -8, 4, -2, -32, 4, -8, 4, -8, -2, 16, 4, 16, 4, 4, -2, 16, -2, 4, -8, 64, 4, -8, -2, -8, 4, -8, -2, -32, -2, 4, -8, -8, 4, -8, -2, -32, 16, 4, -2, 16, 4, 4, 4, 16
Offset: 1

Views

Author

Jaroslav Krizek, Sep 28 2009

Keywords

Comments

The Dirichlet series is Product_{prime p} 1/(1+2/p^s), related to the Feller-Tornier constants like A065474. - R. J. Mathar, Feb 07 2011

Crossrefs

Programs

  • Mathematica
    (-2)^PrimeOmega[Range[100]] (* G. C. Greubel, Apr 16 2016 *)
  • PARI
    a(n) = (-2)^bigomega(n); \\ Altug Alkan, Apr 16 2016

Formula

a(n) = A122803(A001222(n)) = (-2)^bigomega(n) = (-2)^A001222(n).
Abs(a(n)) = A061142(n).

A210869 Triangle of coefficients of polynomials v(n,x) jointly generated with A210868; see the Formula section.

Original entry on oeis.org

1, 0, 2, 1, 0, 3, 0, 3, 0, 5, 1, 0, 7, 0, 8, 0, 4, 0, 15, 0, 13, 1, 0, 12, 0, 30, 0, 21, 0, 5, 0, 31, 0, 58, 0, 34, 1, 0, 18, 0, 73, 0, 109, 0, 55, 0, 6, 0, 54, 0, 162, 0, 201, 0, 89, 1, 0, 25, 0, 145, 0, 344, 0, 365, 0, 144, 0, 7, 0, 85, 0, 361, 0, 707, 0, 655, 0, 233, 1, 0
Offset: 1

Views

Author

Clark Kimberling, Mar 29 2012

Keywords

Comments

Row n starts with 1 or 0 and ends with F(n+1), where F=A000045 (Fibonacci numbers).
Row sums: 1,2,4,8,16,32,... (A000079)
Alternating row sums: 1, -2, 4, -8, 16,... (A122803)
For a discussion and guide to related arrays, see A208510.

Examples

			First six rows:
1
0...2
1...0...3
0...3...0...5
1...0...7...0....8
0...4...0...15...0...13
First three polynomials v(n,x): 1, 2x, 1 + 3x^2
		

Crossrefs

Programs

  • Mathematica
    u[1,x_]:=1;v[1,x_]:=1;z=14;
    u[n_,x_]:=u[n-1,x]+x*v[n-1,x];
    v[n_,x_]:=(x+1)*u[n-1,x]+(x-1)*v[n-1,x];
    Table[Expand[u[n,x]],{n,1,z/2}]
    Table[Expand[v[n,x]],{n,1,z/2}]
    cu=Table[CoefficientList[u[n,x],x],{n,1,z}];
    TableForm[cu]
    Flatten[%]   (* A210868 *)
    cv=Table[CoefficientList[v[n,x],x],{n,1,z}];
    TableForm[cv]
    Flatten[%]   (* A210869 *)
    Table[u[n,x]/.x->1,{n,1,z}]   (* A000079 *)
    Table[v[n,x]/.x->1,{n,1,z}]   (* A000079 *)
    Table[u[n,x]/.x->-1,{n,1,z}]  (* A151575 *)
    Table[v[n,x]/.x->-1,{n,1,z}]  (* A122803 *)

Formula

u(n,x)=u(n-1,x)+x*v(n-1,x),
v(n,x)=(x+1)*u(n-1,x)+(x-1)*v(n-1,x),
where u(1,x)=1, v(1,x)=1.
T(n,k) = T(n-1,k-1) + T(n-2,k) + T(n-2,k-2), T(1,0) = 1, T(2,0) = 0, T(2,1) = 2 and T(n,k) = 0 if k<0 or if k>=n. - Philippe Deléham, Apr 02 2012
Previous Showing 11-20 of 37 results. Next