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-4 of 4 results.

A140359 a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3).

Original entry on oeis.org

1, 1, 6, 11, 26, 51, 106, 211, 426, 851, 1706, 3411, 6826, 13651, 27306, 54611, 109226, 218451, 436906, 873811, 1747626, 3495251, 6990506, 13981011, 27962026, 55924051, 111848106, 223696211, 447392426, 894784851, 1789569706, 3579139411
Offset: 0

Views

Author

Paul Curtz, Jun 24 2008

Keywords

Comments

This is the sequence A(1,1;1,2;3) of the family of sequences [a,b:c,d:k] considered by G. Detlefs, and treated as A(a,b;c,d;k) in the W. Lang link given below. - Wolfdieter Lang, Oct 18 2010

Crossrefs

Programs

  • Magma
    [(5*2^(n+1) -9 + 5*(-1)^n)/6: n in [0..50]]; // G. C. Greubel, Oct 10 2017
  • Mathematica
    Table[(5*2^(n+1) -9 + 5*(-1)^n)/6, {n, 0, 50}] (* G. C. Greubel, Oct 10 2017 *)
    LinearRecurrence[{2,1,-2},{1,1,6},40] (* Harvey P. Dale, Mar 24 2021 *)
  • PARI
    for(n=0,50, print1((5*2^(n+1) -9 + 5*(-1)^n)/6, ", ")) \\ G. C. Greubel, Oct 10 2017
    

Formula

a(n) = 2*a(n-1) + a(n-2) - 2*a(n-3).
a(n+1) - a(n) = 5*A001045(n), Jacobsthal numbers.
a(n+1) - 2*a(n) = (-1)^(n+1)* A010685(n).
From R. J. Mathar, Jul 10 2008: (Start)
O.g.f.: (1-x+3*x^2)/((x-1)*(2*x-1)*(1+x)).
a(n) = (5*2^(n+1) - 9 + 5*(-1)^n)/6. (End)
a(n) = a(n-1) + 2*a(n-2) +3, n>1 - Gary Detlefs, Jun 20 2010

Extensions

Extended by R. J. Mathar, Jul 10 2008

A140428 a(n) = A000045(n) + A113405(n).

Original entry on oeis.org

0, 1, 1, 3, 5, 9, 15, 27, 49, 91, 169, 317, 599, 1143, 2197, 4251, 8269, 16161, 31711, 62435, 123273, 243963, 483745, 960725, 1910503, 3803295, 7577933, 15109499, 30143973, 60166553, 120136687, 239955563, 479396897, 957961755, 1914577241
Offset: 0

Views

Author

Paul Curtz, Jun 19 2008

Keywords

Comments

The inverse binomial transform yields the sequence (-1)^(n+1)*a(n). This property is inherited from the A000045 and A113405 sequences, which have the same property individually. The same sign flipping behavior under inverse binomial transform is found in A001045 and for the sequence with two zeros followed by A000975.
This is often, but not here, related to the recurrences a(n)=2a(n-1)+a(n-2)-2a(n-3) associated with denominators 1-2x-x^2+2x^3=(x-1)(2x-1)(x+1) in the o.g.f., which transform into the similar -(x-1)(2x+1)/(1+x)^4 under the inverse binomial transform, see A137241.

Examples

			a(n) and the repeated differences in the followup rows are:
    0,   1,   1,   3,   5,   9,  15, ...
    1,   0,   2,   2,   4,   6,  12, ...
   -1,   2,   0,   2,   2,   6,  10, ...
    3,  -2,   2,   0,   4,   4,  10, ...
   -5,   4,  -2,   4,   0,   6,   6, ...
    9,  -6,   6,  -4,   6,   0,  12, ...
  -15,  12, -10,  10,  -6, -12,   0, ...
The main diagonal consists of zeros.
		

Programs

  • Magma
    I:=[0,1,1,3,5,9]; [n le 6 select I[n] else 3*Self(n-1)-Self(n-2) -3*Self(n-3)+3*Self(n-4)-Self(n-5)-2*Self(n-6): n in [1..30]]; // G. C. Greubel, Jan 15 2018
  • Mathematica
    CoefficientList[Series[-x (1 - 2 x - 3 x^4 + x^2)/((1 - x - x^2) (2 x - 1) (1 + x) (x^2 - x + 1)), {x, 0, 50}], x] (* G. C. Greubel, Oct 11 2017 *)
    LinearRecurrence[{3,-1,-3,3,-1,-2}, {0,1,1,3,5,9}, 30] (* G. C. Greubel, Jan 15 2018 *)
  • PARI
    a(n)=([0,1,0,0,0,0; 0,0,1,0,0,0; 0,0,0,1,0,0; 0,0,0,0,1,0; 0,0,0,0,0,1; -2,-1,3,-3,-1,3]^n*[0;1;1;3;5;9])[1,1] \\ Charles R Greathouse IV, Oct 03 2016
    

Formula

O.g.f.: -x*(1-2*x-3*x^4+x^2)/((1-x-x^2)*(2*x-1)*(1+x)*(x^2-x+1)). - R. J. Mathar, Jul 10 2008
a(n)= -A128834(n)/3 + 2^n/9 + A000045(n) - (-1)^n/9. - R. J. Mathar, Jul 10 2008

Extensions

Edited and extended by R. J. Mathar, Jul 10 2008

A136161 a(n) = 2*a(n-3) - a(n-6), starting a(0..5) = 0, 5, 2, 1, 3, 1.

Original entry on oeis.org

0, 5, 2, 1, 3, 1, 2, 1, 0, 3, -1, -1, 4, -3, -2, 5, -5, -3, 6, -7, -4, 7, -9, -5, 8, -11, -6, 9, -13, -7, 10, -15, -8, 11, -17, -9, 12, -19, -10, 13, -21, -11, 14, -23, -12, 15, -25, -13, 16, -27, -14
Offset: 0

Views

Author

Paul Curtz, Mar 16 2008

Keywords

Comments

Consider the general recurrence a(n) = k*a(n-1) + (5-2*k)*a(n-2) + (2-k)*a(n-3). The coefficients, in k, can be used to form the triple (k, 5-2*k, 2-k). Each triple is associated with a sequence, for example (0, 5, 2) leads to A111108, A112685, ..., (1, 3, 1) leads to A051927, A097075, ..., and so on. This sequence is formed from the triples {(0, 5, 2), (1, 3, 1), (2, 1, 0), (3, -1, -1), (4, -3, -2), ...}, for k >= 0. (Comment modified by G. C. Greubel, Dec 31 2023).

Crossrefs

Programs

  • Magma
    I:=[0,5,2,1,3,1]; [n le 6 select I[n] else 2*Self(n-3) - Self(n-6): n in [1..60]]; // G. C. Greubel, Dec 26 2023
    
  • Mathematica
    LinearRecurrence[{0,0,2,0,0,-1},{0,5,2,1,3,1},60] (* Harvey P. Dale, Aug 16 2012 *)
    Table[PadRight[{n, 5-2*n, 2-n}], {n,0,20}]//Flatten (* _G. C. Greubel, Dec 26 2023 *)
  • PARI
    Vec(x*(5+2*x+x^2-7*x^3-3*x^4)/((1-x)^2*(1+x+x^2)^2+O(x^99))) \\ Charles R Greathouse IV, Jul 06 2011
    
  • SageMath
    def a(n): # a = A136161
        if n<6: return (0,5,2,1,3,1)[n]
        else: return 2*a(n-3) - a(n-6)
    [a(n) for n in range(61)] # G. C. Greubel, Dec 26 2023

Formula

G.f.: x*(5+2*x+x^2-7*x^3-3*x^4) / ( (1-x)^2*(1+x+x^2)^2 ). - R. J. Mathar, Jul 06 2011
a(3n) = n.
a(3n+1) = 5 - 2*n.
a(3n+3) = 2 - n.
a(n) = (1/9)*( 27 - 2*(n+1) - 34*ChebyshevU(n, -1/2) + (-1)^n*(9*A099254(n) - 6*A099254(n-1)) ). - G. C. Greubel, Dec 26 2023

A136249 a(n)=-a(n-1)+4*a(n-2)+4*a(n-3).

Original entry on oeis.org

4, -2, 1, 7, -11, 43, -59, 187, -251, 763, -1019, 3067, -4091, 12283, -16379, 49147, -65531, 196603, -262139, 786427, -1048571, 3145723, -4194299, 12582907, -16777211, 50331643, -67108859, 201326587, -268435451, 805306363, -1073741819, 3221225467
Offset: 0

Views

Author

Paul Curtz, Mar 17 2008

Keywords

Crossrefs

Programs

  • Magma
    [2^(n-2)+5*(-1)^n*(1-2^(n-2)): n in [0..40]]; // Vincenzo Librandi, Aug 09 2011
  • Mathematica
    LinearRecurrence[{-1,4,4},{4,-2,1},50] (* or *) Table[(5(-2)^n- 40(-1)^n+2^n)/8,{n,50}] (* Harvey P. Dale, Jun 10 2011 *)

Formula

a(2*n)=5-2^(2*n), a(2*n+1)=10-3*a(2n).
a(n)+a(n+1)=A135520(n).
a(n) = 1/6*2^n*a(0) + 1/4*2^n*a(1) - 1/2*a(0)*(-2)^n - 1/3*(-1)^n*a(2) - 1/4*a(1)*(-2)^n + 4/3*(-1)^n*a(0) + 1/4*(-2)^n*a(2) + 1/12*2^n*a(2). - Alexander R. Povolotsky, Mar 31 2008
G.f.: (4+2*x-17*x^2)/((1+2*x)*(1-2*x)*(1+x)). a(n)=2^(n-2)+5*(-1)^n*(1-2^(n-2)). - R. J. Mathar, Jun 15 2009
a(n)=(5*(-2)^n-40*(-1)^n+2^n)/8. - Harvey P. Dale, Jun 10 2011

Extensions

Edited by N. J. A. Sloane, Apr 18 2008
More terms from Harvey P. Dale, Jun 10 2011
Showing 1-4 of 4 results.