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-30 of 53 results. Next

A129267 Triangle with T(n,k) = T(n-1,k-1) + T(n-1,k) - T(n-2,k-1) - T(n-2,k) and T(0,0)=1 .

Original entry on oeis.org

1, 1, 1, 0, 1, 1, -1, -1, 1, 1, -1, -3, -2, 1, 1, 0, -2, -5, -3, 1, 1, 1, 2, -2, -7, -4, 1, 1, 1, 5, 7, -1, -9, -5, 1, 1, 0, 3, 12, 15, 1, -11, -6, 1, 1, -1, -3, 3, 21, 26, 4, -13, -7, 1, 1, -1, -7, -15, -3, 31, 40, 8, -15, -8, 1, 1
Offset: 0

Views

Author

Philippe Deléham, Jun 08 2007

Keywords

Comments

Triangle T(n,k), 0<=k<=n, read by rows given by [1,-1,1,0,0,0,0,0,0,...] DELTA [1,0,0,0,0,0,...] where DELTA is the operator defined in A084938 . Riordan array (1/(1-x+x^2),(x*(1-x))/(1-x+x^2)); inverse array is (1/(1+x),(x/(1+x))*c(x/(1+x))) where c(x)is g.f. of A000108 .
Row sums are ( with the addition of a first row {0}): 0, 1, 2, 2, 0, -4, -8, -8, 0, 16, 32,... (see A009545). - Roger L. Bagula, Nov 15 2009

Examples

			Triangle begins:
   1;
   1,  1;
   0,  1,   1;
  -1, -1,   1,  1;
  -1, -3,  -2,  1,  1;
   0, -2,  -5, -3,  1,   1;
   1,  2,  -2, -7, -4,   1,   1;
   1,  5,   7, -1, -9,  -5,   1,   1;
   0,  3,  12, 15,  1, -11,  -6,   1,  1;
  -1, -3,   3, 21, 26,   4, -13,  -7,  1, 1;
  -1, -7, -15, -3, 31,  40,   8, -15, -8, 1, 1;
		

Crossrefs

Programs

  • Maple
    T:= proc(n, k) option remember;
          if k<0 or  k>n  then 0
        elif n=0 and k=0 then 1
        else T(n-1,k-1) + T(n-1,k) - T(n-2,k-1) - T(n-2,k)
          fi; end:
    seq(seq(T(n, k), k=0..n), n=0..12); # G. C. Greubel, Mar 14 2020
  • Mathematica
    m = {{a, 1}, {-1, 1}}; v[0]:= {0, 1}; v[n_]:= v[n] = m.v[n-1]; Table[CoefficientList[v[n][[1]], a], {n, 0, 10}]//Flatten (* Roger L. Bagula, Nov 15 2009 *)
    T[n_, k_]:= T[n, k]= If[k<0 || k>n, 0, If[n==0 && k==0, 1, T[n-1, k-1] + T[n-1, k] - T[n-2, k-1] - T[n-2, k] ]]; Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Mar 14 2020 *)
  • Sage
    @CachedFunction
    def T(n, k):
        if (k<0 or k>n): return 0
        elif (n==0 and k==0): return 1
        else: return T(n-1,k-1) + T(n-1,k) - T(n-2,k-1) - T(n-2,k)
    [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Mar 14 2020

Formula

Sum{k=0..n} T(n,k)*x^k = { (-1)^n*A057093(n), (-1)^n*A057092(n), (-1)^n*A057091(n), (-1)^n*A057090(n), (-1)^n*A057089(n), (-1)^n*A057088(n), (-1)^n*A057087(n), (-1)^n*A030195(n+1), (-1)^n*A002605(n), A039834(n+1), A000007(n), A010892(n), A099087(n), A057083(n), A001787(n+1), A030191(n), A030192(n), A030240(n), A057084(n), A057085(n), A057086(n) } for x=-11, -10, ..., 8, 9, respectively .
Sum{k=0..n} T(n,k)*A000045(k) = A100334(n).
Sum{k=0..floor(n/2)} T(n-k,k) = A050935(n+2).
T(n,k)= Sum{j>=0} A109466(n,j)*binomial(j,k).
T(n,k) = (-1)^(n-k)*A199324(n,k) = (-1)^k*A202551(n,k) = A202503(n,n-k). - Philippe Deléham, Mar 26 2013
G.f.: 1/(1-x*y+x^2*y-x+x^2). - R. J. Mathar, Aug 11 2015

Extensions

Riordan array definition corrected by Ralf Stephan, Jan 02 2014

A090131 Expansion of (1+x)/(1 - 2*x + 2*x^2).

Original entry on oeis.org

1, 3, 4, 2, -4, -12, -16, -8, 16, 48, 64, 32, -64, -192, -256, -128, 256, 768, 1024, 512, -1024, -3072, -4096, -2048, 4096, 12288, 16384, 8192, -16384, -49152, -65536, -32768, 65536, 196608, 262144, 131072, -262144, -786432, -1048576, -524288, 1048576, 3145728, 4194304, 2097152, -4194304
Offset: 0

Views

Author

Paul Barry, Nov 21 2003

Keywords

Comments

Also first of two associated sequences a(n) and b(n) built from a(0)=1 and b(0)=2 by the formulas a(n) = a(n-1) + b(n-1) and b(n) = -a(n-1) + b(n-1). The initial terms of the second sequence b(n) are 2, 1, -2, -6, -8, -4, 8, 24, 32, 16, -32, -96, -128, -64, 128, 384, 512, 256, -1536, -2048, -1024, 2048, 6144, 8192, .... The formula for b(n) is the same as for a(n) but replacing cosines with sines. Indeed in the complex plane the points Mn=a(n)+b(n)*I are located where the logarithmic spiral Rho=A*(B^Theta) cuts the two pairs of orthogonal straight lines drawn from the origin with slopes 2, 1/3, -1/2 and -3. - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Jun 29 2007

Crossrefs

Cf. A078069.

Programs

Formula

a(n) = sum_{k=0..n} C(n, k)(-1)^floor(k/2)(1 + (1 - (-1)^k)/2).
a(n) = A*(B^Theta(n))*cos(Theta(n)) where A = 3.644691771.. = (5^0,5)*16^(arctan(2)/(2*Pi)) B = 0.64321824.. = 16^(-1/(2*Pi)) Theta(4p+1) = p*Pi + arctan(2) Theta(4*p+2) = p*Pi + arctan(1/3) Theta(4*p+3) = p*Pi + arctan(-1/2) Theta(4*p+4) = p*Pi + arctan(-3). - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Jun 29 2007
Also a(0)=1, a(1)=3, a(2)=4, a(3)=2 and for n>3 a(n) = -4 * a(n-4). - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Jun 29 2007
a(n) = 4a(n-1) - 6a(n-2) + 4a(n-3). - Paul Curtz, Nov 20 2007
a(n) = 2a(n-1) - 2a(n-2) = A009545(n) + A009545(n+1) = (1/2)*((1+2*i)*(1-i)^n + (1-2*i)*(1+i)^n). - Ralf Stephan, Jul 21 2013

A100213 Expansion of g.f.: x*(4-7*x+2*x^2-8*x^4+16*x^5-16*x^6)/((1-2*x) * (1-2*x^2) * (1-2*x+2*x^2) * (1+2*x^2)).

Original entry on oeis.org

4, 9, 14, 18, 32, 64, 128, 256, 544, 1104, 2144, 4128, 8192, 16384, 32768, 65536, 131584, 263424, 525824, 1049088, 2097152, 4194304, 8388608, 16777216, 33562624, 67129344, 134242304, 268443648, 536870912, 1073741824, 2147483648, 4294967296, 8590065664
Offset: 1

Views

Author

Creighton Dement, Nov 11 2004

Keywords

Comments

The sequence can be created applying the pos operator (which sums over the positive coefficients) to the n-th power of the Floretion element (.5 'j + .5 'k + .5 j' + .5 k' + 1 'ii' + 1 e).

Examples

			a(5) = 32 because (.5 'j + .5 'k + .5 j' + .5 k' + 1 'ii' + 1 e)^5 = - 2 'j - 2 'k - 2 j' - 2 k' + 6 'ii' + 10 'jj' + 10 'kk' + 6 e,
and the sum of all positive coefficients is 6+10+10+6 = 32.
		

Crossrefs

Programs

  • Magma
    R:=PowerSeriesRing(Integers(), 50); Coefficients(R!( x*(4-7*x+2*x^2-8*x^4+16*x^5-16*x^6)/((1-4*x+6*x^2-4*x^3)*(1-4*x^4)) )); // G. C. Greubel, Mar 29 2024
    
  • Mathematica
    Rest[CoefficientList[Series[x(4-7x+2x^2-8x^4+16x^5-16x^6)/((1-2x)(1-2x^2)(1-2x+2x^2)(1+2x^2)),{x,0,40}],x]] (* or *) LinearRecurrence[{4,-6,4,4,-16,24,-16},{4,9,14,18,32,64,128},40] (* Harvey P. Dale, Aug 23 2015 *)
  • Sage
    def A100213_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x*(4-7*x+2*x^2-8*x^4+16*x^5-16*x^6)/((1-4*x+6*x^2-4*x^3)*(1-4*x^4)) ).list()
    a=A100213_list(51); a[1:] # G. C. Greubel, Mar 29 2024

Formula

a(n) = A100215(n) - A100212(n).
a(n) = (-1)^n*A009116(n+3) + A100216 + A038503(n+1).
Equation above in Floretian Algebra operator speak: (pos) + (neg) = (ves) = (jes) + (les) + (tes)
a(n-1) = A000079(n+1) + (5*A077957(n) + 6*A077957(n-1))/4 + A009545(n)/2 + A009545(n+1) + A077966(n-1) - A077966(n)/4. - R. J. Mathar, May 07 2008
From G. C. Greubel, Mar 29 2024: (Start)
a(n) = (1/16)*( 2^(n+4) - 2*((1+5*i)*(1+i)^n + (1-5*i)*(1-i)^n) + (1 - (-1)^n)*2^((n+1)/2)*(5+i^(n+1)) + (1+(-1)^n)*2^(1+n/2)*(3-2*i^n) ).
a(2*n-1) = 2^(n-3)*( 2^(n+2) + 5 + (-1)^n - 6*cos(n*Pi/2) + 4*sin(n*Pi/2) ), for n >= 1.
a(2*n) = 2^(n-2)*( 2^(n+2) + 3 - 2*(-1)^n - cos(n*Pi/2) + 5*sin(n*Pi/2) ), n >= 1.
E.g.f.: -1 + exp(2*x) + (1/8)*(6*cosh(sqrt(2)*x) + 5*sqrt(2)* sinh(sqrt(2)*x) - (4*cos(sqrt(2)*x) + sqrt(2)*sin(sqrt(2)*x)) - 2*exp(x)*(cos(x) - 5*sin(x)) ). (End)

Extensions

Replaced definition with generating function, changed offset to 1. - R. J. Mathar, Mar 12 2010

A117440 A cyclically signed version of Pascal's triangle.

Original entry on oeis.org

1, 1, 1, -1, 2, 1, -1, -3, 3, 1, 1, -4, -6, 4, 1, 1, 5, -10, -10, 5, 1, -1, 6, 15, -20, -15, 6, 1, -1, -7, 21, 35, -35, -21, 7, 1, 1, -8, -28, 56, 70, -56, -28, 8, 1, 1, 9, -36, -84, 126, 126, -84, -36, 9, 1, -1, 10, 45, -120, -210, 252, 210, -120, -45, 10, 1
Offset: 0

Views

Author

Paul Barry, Mar 16 2006

Keywords

Examples

			Triangle begins:
   1;
   1,  1;
  -1,  2,   1;
  -1, -3,   3,   1;
   1, -4,  -6,   4,   1;
   1,  5, -10, -10,   5,   1;
  -1,  6,  15, -20, -15,   6, 1;
  -1, -7,  21,  35, -35, -21, 7, 1;
		

Crossrefs

Cf. A007318, A009545 (row sums), A117441 (diagonal sums), A117442 (inverse).

Programs

  • Mathematica
    Table[Binomial[n, k]*(Cos[Pi*(n-k)/2] +Sin[Pi*(n-k)/2]), {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jun 01 2021 *)
  • Sage
    flatten([[binomial(n,k)*( cos(pi*(n-k)/2) + sin(pi*(n-k)/2) ) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jun 01 2021

Formula

Column k has e.g.f.: (x^k/k!)*(cos(x) + sin(x)).
T(n, k) = binomial(n,k)*(cos(Pi*(n-k)/2) + sin(Pi*(n-k)/2)).
Sum_{k=0..n} T(n, k) = A009545(n+1).
Sum_{k=0..floor(n/2)} T(n-k, k) = A117441(n) (upward diagonal sums).
G.f.: (1 + x - x*y)/(1 - 2*x*y + x^2*(1 + y^2)). - Stefano Spezia, Mar 10 2024

A140344 Catalan triangle A009766 prepended by n zeros in its n-th row.

Original entry on oeis.org

1, 0, 1, 1, 0, 0, 1, 2, 2, 0, 0, 0, 1, 3, 5, 5, 0, 0, 0, 0, 1, 4, 9, 14, 14, 0, 0, 0, 0, 0, 1, 5, 14, 28, 42, 42, 0, 0, 0, 0, 0, 0, 1, 6, 20, 48, 90, 132, 132, 0, 0, 0, 0, 0, 0, 0, 1, 7, 27, 75, 165, 297, 429, 429, 0, 0, 0, 0, 0, 0, 0, 0, 1, 8, 35, 110, 275, 572, 1001, 1430, 1430
Offset: 0

Views

Author

Paul Curtz, May 29 2008

Keywords

Comments

The triangle's n-th row is also related to recurrences for sequences f(n) which p-th differences, p=n+2: The denominator of the generating function contains a factor 1-2x in these cases.
This factor may be "lifted" either by looking at auxiliary sequences f(n+1)-2f(n) or by considering the corresponding "degenerate" shorter recurrences right away. In the case p=4, the recurrence is f(n)=4f(n-1)-6f(n-2)+4f(n-3) from the 4th row in A135356, the denominator in the g.f. is 1-4x+6x^2-4x^3=(1-2x)(1-2x+2x^2), which yields the degenerate recurrence f(n)=2f(n-1)-2f(n-2) from the 2nd factor and leaves the first three coefficients of 1/(1-2x+2x^2)=1+2x+2x^2+.. in row 2.
A000749 is an example which follows the recurrence but not the degenerate recurrence, but still A000749(n+1)-2A000749(n) = 0, 0, 1, 2, 2,.. starts with the 3 coefficients. A009545 follows both recurrences and starts with the three nonzero terms because there is only a power of x in the numerator of the g.f.
In the case p=5, the recurrence is f(n)=5f(n-1)-10f(n-2)+10f(n-3)-5f(n-4)+2f(n-5), the denominator in the g.f. is 1-5x+10x^2-10x^3+5x^4-2x^5= (1-2x)(1-3x+4x^2-2x^3+x^4), where 1/(1-3x+4x^2-2x^3+x^4) = 1+3x+5x^2+5x^3+... and the 4 coefficients populate row 3.
A049016 obeys the main recurrence but not the degenerate recurrence f(n)=3f(n-1)-4f(n-2)+2f(n-3)-f(n-4), yet A049016(n+1)-2A049016(n)=1, 3, 5, 5,.. starts with the 4 coefficients. A138112 obeys both recurrences and is constructed to start with the 4 coefficients themselves.
In the nomenclature of Foata and Han, this is the doubloon polynomial triangle d_{n,m}(0), up to index shifts. - R. J. Mathar, Jan 27 2011

Examples

			Triangle starts
1;
0,1,1;
0,0,1,2,2;
0,0,0,1,3,5,5;
0,0,0,0,1,4,9,14,14;
		

Crossrefs

Cf. A135356, A130020, A139687, A140343 (p=6), A140342 (p=7).

Programs

  • Mathematica
    Table[Join[Array[0&, n], Table[Binomial[n+k, n]*(n-k+1)/(n+1), {k, 0, n}]], {n, 0, 8}] // Flatten (* Jean-François Alcover, Dec 16 2014 *)

Extensions

Edited by R. J. Mathar, Jul 10 2008

A099855 a(n) = n*2^n - 2^(n/2)*sin(Pi*n/4).

Original entry on oeis.org

0, 1, 6, 22, 64, 164, 392, 904, 2048, 4592, 10208, 22496, 49152, 106560, 229504, 491648, 1048576, 2227968, 4718080, 9960960, 20971520, 44041216, 92276736, 192940032, 402653184, 838856704, 1744822272, 3623870464, 7516192768
Offset: 0

Views

Author

Paul Barry, Oct 28 2004

Keywords

Comments

Related to binomial transform of A002265. Sequence is identical to its fourth differences (cf. A139756, A137221). See also A097064, A135035, A038504, A135356. - Paul Curtz, Jun 18 2008

Crossrefs

Binomial transform of A047538.

Programs

  • Magma
    I:=[0,1,6,22]; [n le 4 select I[n] else 6*Self(n-1) -14*Self(n-2) +16*Self(n-3) -8*Self(n-4): n in [1..51]]; // G. C. Greubel, Apr 20 2023
    
  • Mathematica
    LinearRecurrence[{6,-14,16,-8},{0,1,6,22},30] (* Harvey P. Dale, Mar 22 2018 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A099855
        if (n<5): return (0,1,6,22,64)[n]
        else: return 6*a(n-1) - 14*a(n-2) + 16*a(n-3) - 8*a(n-4)
    [a(n) for n in range(51)] # G. C. Greubel, Apr 20 2023

Formula

G.f.: x/((1-2*x+2*x^2)*(1-4*x+4*x^2)).
a(n) = Sum_{k=0..n} 2^(k/2)*sin(Pi*k/4)*2^(n-k)*(n-k+1).
a(n) = 6*a(n-1) - 14*a(n-2) + 16*a(n-3) - 8*a(n-4).
a(n) = 2*A001787(n) - A009545(n).

A100216 Relates row sums of Pascal's triangle to expansion of cos(x)/exp(x).

Original entry on oeis.org

1, 4, 9, 16, 26, 44, 84, 176, 376, 784, 1584, 3136, 6176, 12224, 24384, 48896, 98176, 196864, 393984, 787456, 1573376, 3144704, 6288384, 12578816, 25163776, 50335744, 100675584, 201342976, 402661376, 805289984, 1610563584, 3221159936
Offset: 0

Views

Author

Creighton Dement, Nov 11 2004

Keywords

Comments

A100215(n) (ves) = ((-1)^n)*A009116(n+3) (jes) + a(n) (les) + A038503(n+1) (tes) (Sn, below, corresponds to the generating function from above). Coefficients of Sn(z)*(1-z)/(1+z) gives match to A038504 (Sum of every 4th entry of row n in Pascal's triangle, starting at "n choose 1"). Coefficients of Sn(z)/(1+z) gives match to A038505 (Sum of every 4th entry of row n in Pascal's triangle, starting at "n choose 2"). Coefficients of Sn(z)/(1-z^2) gives match to A000749 (Number of strings over Z_2 of length n with trace 1 and subtrace 1). The elements 'i, 'j, 'k, i', j', k', 'ii', 'jj', 'kk', 'ij', 'ik', 'ji', 'jk', 'ki', 'kj', e ("floretions") are members of the quaternion product factor space Q x Q /{(1,1), (-1,-1)}. "les" sums over coefficients belonging to basis vectors which squared give the unit e (excluding e itself).
This sequence is identical to its 4th differences. - Jean-François Alcover, Nov 07 2013

Examples

			a(2) = 9 because (.5 'j + .5 'k + .5 j' + .5 k' + 1 'ii' + 1 e)^3 =
1'j + 1'k + 1j' + 1k' + 3'ii' + 2'jj' + 2'kk' + 1'jk' + 1'kj' + 1e
and the sum of the coefficients belonging to basis vectors which squared give the unit e (excluding e itself) is 3+2+2+1+1 = 9 (see comment).
		

Crossrefs

Programs

  • Magma
    [n le 3 select n^2 else 4*Self(n-1) -6*Self(n-2) +4*Self(n-3): n in [1..40]]; // G. C. Greubel, Mar 28 2024
    
  • Maple
    a:= n-> (<<0|1|0>, <0|0|1>, <4|-6|4>>^n. <<1, 4, 9>>)[1, 1]:
    seq(a(n), n=0..35);  # Alois P. Heinz, Nov 07 2013
  • Mathematica
    d = 4; nmax = 31; a[n_ /; n < d] := (n + 1)^2; seq = Table[a[n], {n, 0, nmax}]; seq /. Solve[ Thread[ Take[seq, nmax - d + 1] == Differences[seq, d]]] // First (* Jean-François Alcover, Nov 07 2013 *)
    LinearRecurrence[{4,-6,4}, {1,4,9}, 41] (* G. C. Greubel, Mar 28 2024 *)
  • SageMath
    @CachedFunction
    def a(n): # a = A100216
        if n<3: return (n+1)^2
        else: return 4*a(n-1) -6*a(n-2) +4*a(n-3)
    [a(n) for n in range(41)] # G. C. Greubel, Mar 28 2024

Formula

a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3), with a(0) = 1, a(1) = 4, a(2) = 9.
G.f.: (1-x^2)/((1-2*x)*(1-2*x+2*x^2)).
(a(n)) = lesseq(.5 'j + .5 'k + .5 j' + .5 k' + 1 'ii' + 1 e).
2*a(n) = 3*2^n - A009545(n+1) + 4*A009545(n). - R. J. Mathar, May 21 2019
E.g.f.: (1/2)*exp(x)*(3*sin(x) - cos(x) + 3*exp(x)). - G. C. Greubel, Mar 28 2024

A100238 G.f. A(x) satisfies: 2^n + 1 = Sum_{k=0..n} [x^k] A(x)^n for n>=1.

Original entry on oeis.org

1, 2, -2, 4, -12, 40, -144, 544, -2128, 8544, -35008, 145792, -615296, 2625792, -11311616, 49124352, -214838528, 945350144, -4182412288, 18593224704, -83015133184, 372090122240, -1673660915712, 7552262979584, -34178799378432, 155096251351040, -705533929816064
Offset: 0

Views

Author

Paul D. Hanna, Nov 30 2004

Keywords

Examples

			From the table of powers of A(x), we see that
2^n+1 = Sum of coefficients [x^0] through [x^n] in A(x)^n:
A^1: [1, 2], -2, 4, -12, 40, -144, 544, -2128, 8544, ...;
A^2: [1, 4, 0], 0, -4, 16, -64, 256, -1040, 4288, ...;
A^3: [1, 6, 6, -4], 0, 0, -8, 48, -240, 1120, -5088, ...;
A^4: [1, 8, 16, 0, -8], 0, 0, 0, -16, 128, -768, ...;
A^5: [1, 10, 30, 20, -20, -8], 0, 0, 0, 0, -32, ...;
A^6: [1, 12, 48, 64, -12, -48, 0], 0, 0, 0, 0, 0, ...;
A^7: [1, 14, 70, 140, 56, -112, -56, 16], 0, 0, 0, ...;
A^8: [1, 16, 96, 256, 240, -128, -256, 0, 32], 0, 0, ...; ...
In the above table of coefficients in A(x)^n, the main diagonal satisfies:
[x^n] A(x)^(n+1) = (n+1)*A009545(n+1) for n>=0.
		

Crossrefs

a(n) = -(-1)^n * A025227(n), if n>1.

Programs

  • PARI
    {a(n)=if(n==0,1,(2^n+1-sum(k=0,n,polcoeff(sum(j=0,min(k,n-1),a(j)*x^j)^n+x*O(x^k),k)))/n)}
    
  • PARI
    {a(n)=if(n==0,1,if(n==1,2,if(n==2,-2,(-2*(2*n-3)*a(n-1)+4*(n-3)*a(n-2))/n)))}
    
  • PARI
    {a(n)=polcoeff( (1+2*x+sqrt(1+4*x-4*x^2+x^2*O(x^n)))/2,n)}
    
  • PARI
    a(n)=polcoeff((1+2*x+sqrt(1+4*x-4*x^2+x*O(x^n)))/2,n)

Formula

a(n) = (-2*(2*n-3)*a(n-1) + 4*(n-3)*a(n-2))/n for n>2, with a(0)=1, a(1)=2, a(2)=-2.
G.f.: A(x) = (1+2*x + sqrt(1+4*x-4*x^2))/2.
G.f. satisfies: (2+z)^n + (1+z)^n - z^n = Sum_{k=0..n} [x^k] (A(x)+z*x)^n for all z, where [x^k] F(x) denotes the coefficient of x^k in F(x).
Given g.f. A(x), then B(x)=A(x)-1-x series reversion is -B(-x). - Michael Somos, Sep 07 2005
Given g.f. A(x) and C(x) = g.f. of A025225, then B(x)=A(x)-1-x satisfies B(x)=x-C(x*B(x)). - Michael Somos, Sep 07 2005
G.f.: 4x^2/(1+2x - sqrt(1+4x-4x^2)). - Michael Somos, Sep 08 2005

A138377 a(0) = 0, a(1) = 1, a(2) = 3, a(3) = 2; thereafter a(n) = -4*a(n-4).

Original entry on oeis.org

0, 1, 3, 2, 0, -4, -12, -8, 0, 16, 48, 32, 0, -64, -192, -128, 0, 256, 768, 512, 0, -1024, -3072, -2048, 0, 4096, 12288, 8192, 0, -16384, -49152, -32768, 0, 65536, 196608, 131072, 0, -262144, -786432, -524288, 0, 1048576, 3145728, 2097152, 0, -4194304, -12582912, -8388608, 0, 16777216, 50331648
Offset: 0

Views

Author

Paul Curtz, May 08 2008

Keywords

Comments

First and third differences have only 2^n's.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,0,0,-4},{0,1,3,2},60] (* Harvey P. Dale, Mar 19 2012 *)
  • PARI
    x='x+O('x^25); Vec(x*(1+x)*(2*x+1)/((1-2*x+2*x^2)*(1+2*x+2*x^2))) \\ G. C. Greubel, Feb 20 2017

Formula

From R. J. Mathar, May 09 2008: (Start)
O.g.f.: x*(1+x)*(2*x+1)/((1-2*x+2*x^2)*(1+2*x+2*x^2)).
a(n) = (5*A009545(n) - A108520(n))/4. (End)

A190966 a(n) = 4*a(n-1) - 8*a(n-2), with a(0)=0, a(1)=1.

Original entry on oeis.org

0, 1, 4, 8, 0, -64, -256, -512, 0, 4096, 16384, 32768, 0, -262144, -1048576, -2097152, 0, 16777216, 67108864, 134217728, 0, -1073741824, -4294967296, -8589934592, 0, 68719476736, 274877906944, 549755813888, 0, -4398046511104, -17592186044416, -35184372088832
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A190958 (index to generalized Fibonacci sequences).

Programs

  • Magma
    [n le 2 select n-1 else 4*(Self(n-1) -2*Self(n-2)): n in [1..41]]; // G. C. Greubel, Jan 10 2024
    
  • Mathematica
    LinearRecurrence[{4,-8}, {0,1}, 50]
  • SageMath
    A190966=BinaryRecurrenceSequence(4,-8,0,1)
    [A190966(n) for n in range(41)] # G. C. Greubel, Jan 10 2024

Formula

G.f.: x/(1 - 4*x + 8*x^2). - Philippe Deléham, Oct 12 2011
a(n) = 2^(n-1)*A009545(n). - R. J. Mathar, Apr 07 2022
From G. C. Greubel, Jan 10 2024: (Start)
a(n) = 8^((n-1)/2)*ChebyshevU(n-1, 1/sqrt(2)).
E.g.f.: (1/2)*exp(2*x)*sin(2*x). (End)
a(n) = (i/4)*((2 - 2*i)^n - (2 + 2*i)^n), where i=sqrt(-1). - Taras Goy, Jan 04 2025
Previous Showing 21-30 of 53 results. Next