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.

Showing 1-3 of 3 results.

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

Original entry on oeis.org

1, 1, -1, -2, 2, 4, -4, -8, 8, 16, -16, -32, 32, 64, -64, -128, 128, 256, -256, -512, 512, 1024, -1024, -2048, 2048, 4096, -4096, -8192, 8192, 16384, -16384, -32768, 32768, 65536, -65536, -131072, 131072, 262144, -262144, -524288, 524288
Offset: 0

Views

Author

Paul Barry, Mar 29 2006

Keywords

Comments

Row sums of A116949.
From Paul Curtz, Oct 24 2012: (Start)
b(n) = abs(a(n)) = A158780(n+1) = 1,1,1,2,2,4,4,8,8,8,... .
Consider the autosequence (that is a sequence whose inverse binomial transform is equal to the signed sequence) of the first kind of the example. Its numerator is A046978(n), its denominator is b(n). The numerator of the first column is A075553(n).
The denominator corresponding to the 0's is a choice.
The classical denominator is 1,1,1,2,1,4,4,8,1,16,16,32,1,... . (End)

Examples

			   0/1,  1/1    1/1,   1/2,   0/2,  -1/4,  -1/4,  -1/8, ...
   1/1,  0/1,  -1/2,  -1/2,  -1/4,   0/4,   1/8,   1/8, ...
  -1/1, -1/2,   0/2,   1/4,   1/4,   1/8,   0/8, -1/16, ...
   1/2,  1/2,   1/4,   0/4   -1/8,  -1/8, -1/16,  0/16, ...
   0/2, -1/4,  -1/4,  -1/8,   0/8,  1/16,  1/16,  1/32, ...
  -1/4,  0/4,   1/8,   1/8,  1/16,  0/16, -1/32, -1/32, ...
   1/4,  1/8,   0/8, -1/16, -1/16, -1/32,  0/32,  1/64, ...
  -1/8, -1/8, -1/16,  0/16,  1/32,  1/32,  1/64,  0/64. - _Paul Curtz_, Oct 24 2012
		

Crossrefs

The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A029744 = {s(n), n>=1}, the numbers 2^k and 3*2^k, as the parent: A029744 (s(n)); A052955 (s(n)-1), A027383 (s(n)-2), A354788 (s(n)-3), A347789 (s(n)-4), A209721 (s(n)+1), A209722 (s(n)+2), A343177 (s(n)+3), A209723 (s(n)+4); A060482, A136252 (minor differences from A354788 at the start); A354785 (3*s(n)), A354789 (3*s(n)-7). The first differences of A029744 are 1,1,1,2,2,4,4,8,8,... which essentially matches eight sequences: A016116, A060546, A117575, A131572, A152166, A158780, A163403, A320770. The bisections of A029744 are A000079 and A007283. - N. J. A. Sloane, Jul 14 2022

Programs

  • Magma
    [1] cat [(-1)^Floor(n/2)*2^Floor((n-1)/2): n in [1..50]]; // G. C. Greubel, Apr 19 2023
    
  • Mathematica
    CoefficientList[Series[(1-x^3)/((1-x)(1+2x^2)),{x,0,40}],x] (* or *) LinearRecurrence[{0,-2},{1,1,-1},45] (* Harvey P. Dale, Apr 09 2018 *)
  • PARI
    a(n)=if(n,(-1)^(n\2)<<((n-1)\2),1) \\ Charles R Greathouse IV, Jan 31 2012
    
  • SageMath
    def A117575(n): return 1 if (n==0) else (-1)^(n//2)*2^((n-1)//2)
    [A117575(n) for n in range(51)] # G. C. Greubel, Apr 19 2023

Formula

a(n) = a(n-1) - 2*a(n-2) + 2*a(n-3) for n >= 3.
a(n) = (cos(Pi*n/2) + sin(Pi*n/2)) * (2^((n-1)/2)*(1-(-1)^n)/2 + 2^((n-2)/2)*(1+(-1)^n)/2 + 0^n/2).
a(n+1) = Sum_{k=0..n} A122016(n,k)*(-1)^k. - Philippe Deléham, Jan 31 2012
E.g.f.: (1 + cos(sqrt(2)*x) + sqrt(2)*sin(sqrt(2)*x))/2. - Stefano Spezia, Feb 05 2023
a(n) = (-1)^floor(n/2)*2^floor((n-1)/2), with a(0) = 1. - G. C. Greubel, Apr 19 2023

A122117 a(n) = 3*a(n-1) + 4*a(n-2), with a(0)=1, a(1)=2.

Original entry on oeis.org

1, 2, 10, 38, 154, 614, 2458, 9830, 39322, 157286, 629146, 2516582, 10066330, 40265318, 161061274, 644245094, 2576980378, 10307921510, 41231686042, 164926744166, 659706976666, 2638827906662, 10555311626650, 42221246506598
Offset: 0

Views

Author

Philippe Deléham, Oct 19 2006

Keywords

Comments

Inverse binomial transform of A005053. Binomial transform of [1, 1, 7, 13, 55, ...] = A015441(n+1).
Convolved with [1, 2, 2, 2, ...] = powers of 4: [1, 4, 16, 64, ...]. - Gary W. Adamson, Jun 02 2009
a(n) is the number of compositions of n when there are 2 types of 1 and 6 types of other natural numbers. - Milan Janjic, Aug 13 2010

Crossrefs

Programs

  • GAP
    a:=[1,2];; for n in [3..30] do a[n]:=3*a[n-1]+4*a[n-2]; od; a; # G. C. Greubel, May 18 2019
    
  • Magma
    I:=[1, 2]; [n le 2 select I[n] else 3*Self(n-1)+4*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jul 06 2012
    
  • Mathematica
    CoefficientList[Series[(1-x)/(1-3*x-4*x^2),{x,0,30}],x] (* Vincenzo Librandi, Jul 06 2012 *)
  • PARI
    Vec((1-x)/(1-3*x-4*x^2)+O(x^30)) \\ Charles R Greathouse IV, Jan 11 2012
    
  • Python
    def A122117(n): return ((4<<(m:=n<<1))|2)//5-((1<Chai Wah Wu, Apr 22 2025
  • Sage
    from sage.combinat.sloane_functions import recur_gen2b; it = recur_gen2b(1,2,3,4, lambda n: 0); [next(it) for i in range(24)] # Zerinvary Lajos, Jul 03 2008
    
  • Sage
    ((1-x)/(1-3*x-4*x^2)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, May 18 2019
    

Formula

a(n) = 2*A108981(n-1) for n > 0, with a(0) = 1.
a(2*n) = 4*a(2*n-1) + 2, a(2*n+1) = 4*a(2*n) - 2.
a(n) = Sum_{k=0..n} 2^(n-k)*A055380(n,k).
G.f.: (1-x)/(1-3*x-4*x^2).
Lim_{n->infinity} a(n+1)/a(n) = 4.
a(n) = Sum_{k=0..n} A122016(n,k)*2^k. - Philippe Deléham, Nov 05 2008
a(n) = A100088(2*n). - Chai Wah Wu, Apr 22 2025

Extensions

Corrected by T. D. Noe, Nov 07 2006

A147518 Expansion of (1-x)/(1-4*x-6*x^2).

Original entry on oeis.org

1, 3, 18, 90, 468, 2412, 12456, 64296, 331920, 1713456, 8845344, 45662112, 235720512, 1216854720, 6281741952, 32428096128, 167402836224, 864179921664, 4461136704000, 23029626345984, 118885325607936, 613719060507648
Offset: 0

Views

Author

Philippe Deléham, Nov 06 2008

Keywords

Comments

Binomial transform of [1,2,13,44,205,...] = A002534(n+1).
a(n) is the number of compositions of n when there are 3 types of 1 and 9 types of other natural numbers. - Milan Janjic, Aug 13 2010

Crossrefs

Programs

  • GAP
    a:=[1,3];; for n in [3..30] do a[n]:=4*a[n-1]+6*a[n-2]; od; a; # G. C. Greubel, Jan 09 2020
  • Magma
    I:=[1,3]; [n le 2 select I[n] else 4*Self(n-1) + 6*Self(n-2): n in [1..30]]; // G. C. Greubel, Jan 09 2020
    
  • Maple
    seq(coeff(series((1-x)/(1-4*x-6*x^2), x, n+1), x, n), n = 0..30); # G. C. Greubel, Jan 09 2020
  • Mathematica
    CoefficientList[Series[(1-x)/(1-4x-6x^2),{x,0,30}],x] (* or *) LinearRecurrence[{4,6},{1,3},30] (* Harvey P. Dale, Aug 22 2016 *)
  • PARI
    my(x='x+O('x^30)); Vec((1-x)/(1-4*x-6*x^2)) \\ G. C. Greubel, Jan 09 2020
    
  • Sage
    def A147518_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( (1-x)/(1-4*x-6*x^2) ).list()
    A147518_list(30) # G. C. Greubel, Jan 09 2020
    

Formula

a(n) = 4*a(n-1) + 6*a(n-2) with a(0)=1, a(1)=3.
a(n) = Sum_{k=0..n} A122016(n,k)*3^k.
a(n) = ((10+sqrt(10))/20)*(2+sqrt(10))^n + ((10-sqrt(10))/20)*(2-sqrt(10))^n. - Richard Choulet, Nov 20 2008
Showing 1-3 of 3 results.