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-10 of 19 results. Next

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

Original entry on oeis.org

1, -1, 3, -5, 11, -21, 43, -85, 171, -341, 683, -1365, 2731, -5461, 10923, -21845, 43691, -87381, 174763, -349525, 699051, -1398101, 2796203, -5592405, 11184811, -22369621, 44739243, -89478485, 178956971, -357913941, 715827883, -1431655765, 2863311531, -5726623061
Offset: 0

Views

Author

N. J. A. Sloane, Nov 17 2002

Keywords

Comments

a(n+1) is the reflection of a(n) through a(n-1) on the numberline. - Floor van Lamoen, Aug 31 2004
If a zero is added as the (new) a(0) in front, the sequence represents the inverse binomial transform of A001045. Partial sums are in A077898. - R. J. Mathar, Aug 30 2008
a(n) = A077953(2*n+3). - Reinhard Zumkeller, Oct 07 2008
Related to the Fibonacci sequence by an INVERT transform: if A(x) = 1+x^2*g(x) is the generating function of the a(n) prefixed with 1, 0, then 1/A(x) = 2+(x+1)/(x^2-x+1) is the generating function of 1, 0, -1, 1, -2, 3, ..., the signed Fibonacci sequence A000045 prefixed with 1. - Gary W. Adamson, Jan 07 2011
Also: Gaussian binomial coefficients [n+1,1], or q-integers, for q=-2, diagonal k=1 in the triangular (or column r=1 in the square) array A015109. - M. F. Hasler, Nov 04 2012
With a leading zero, 0, 1, -1, 3, -5, 11, -21, 43, -85, 171, -341, 683, ... we obtain the Lucas U(-1,-2) sequence. - R. J. Mathar, Jan 08 2013
Let m = a(n). Then 18*m^2 - 12*m + 1 = A000225(2n+3). - Roderick MacPhee, Jan 17 2013

Examples

			G.f. = 1 - x + 3*x^2 - 5*x^3 + 11*x^4 - 21*x^5 + 43*x^6 - 85*x^7 + ...
		

Crossrefs

Cf. A001045 (unsigned version).
Cf. A014983, A014985, A014986. - Zerinvary Lajos, Dec 16 2008

Programs

Formula

G.f.: 1/(1+x-2*x^2).
a(n) = (1-(-2)^(n+1))/3. - Vladeta Jovovic, Apr 17 2003
a(n) = Sum_{k=0..n} (-2)^k. - Paul Barry, May 26 2003
a(n+1) - a(n) = A122803(n). - R. J. Mathar, Aug 30 2008
a(n) = Sum_{k=0..n} A112555(n,k)*(-2)^k. - Philippe Deléham, Sep 11 2009
a(n) = A082247(n+1) - 1. - Philippe Deléham, Oct 07 2009
G.f.: Q(0)/(3*x), where Q(k) = 1 - 1/(4^k - 2*x*16^k/(2*x*4^k + 1/(1 + 1/(2*4^k - 8*x*16^k/(4*x*4^k - 1/Q(k+1)))))); (continued fraction). - Sergei N. Gladkovskii, May 22 2013
G.f.: Q(0)/2 , where Q(k) = 1 + 1/(1 - x*(4*k-1 + 2*x)/( x*(4*k+1 + 2*x) + 1/Q(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Sep 08 2013
E.g.f.: (2*exp(-2*x) + exp(x))/3. - Ilya Gutkovskiy, Nov 12 2016
a(n) = A086893(n+2) - A061547(n+3), n >= 0. - Yosu Yurramendi, Jan 16 2017
a(n) = (-1)^n*A001045(n+1). - M. F. Hasler, Feb 13 2020
a(n) - a(n-1) = a(n-1) - a(n+1) = (-2)^n, a(n+1) = - a(n) + 2*a(n-1) = 1 - 2*a(n). - Michael Somos, Feb 22 2023

A014983 a(n) = (1 - (-3)^n)/4.

Original entry on oeis.org

0, 1, -2, 7, -20, 61, -182, 547, -1640, 4921, -14762, 44287, -132860, 398581, -1195742, 3587227, -10761680, 32285041, -96855122, 290565367, -871696100, 2615088301, -7845264902, 23535794707, -70607384120, 211822152361, -635466457082, 1906399371247
Offset: 0

Views

Author

Keywords

Comments

q-integers for q=-3.
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=-3, A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n)=(-1)^n*charpoly(A,0). - Milan Janjic, Jan 27 2010
Pisano period lengths: 1, 2, 1, 4, 4, 2, 3, 8, 1, 4, 10, 4, 6, 6, 4, 16, 16, 2, 9, 4, ... - R. J. Mathar, Aug 10 2012

Crossrefs

Programs

  • Magma
    [(1-(-3)^n)/4: n in [0..30]]; // G. C. Greubel, May 26 2018
  • Maple
    a:=n->sum ((-3)^j, j=0..n): seq(a(n), n=-1..25); # Zerinvary Lajos, Dec 16 2008
  • Mathematica
    nn = 25; CoefficientList[Series[x/((1 - x)*(1 + 3*x)), {x, 0, nn}], x] (* T. D. Noe, Jun 21 2012 *)
    Table[(1 - (-3)^n)/4, {n, 0, 27}] (* Michael De Vlieger, Nov 23 2016 *)
  • PARI
    a(n)=(1-(-3)^n)/4
    
  • Sage
    [gaussian_binomial(n,1,-3) for n in range(0,27)] # Zerinvary Lajos, May 28 2009
    

Formula

a(n) = a(n-1) + (-3)^(n-1).
G.f.: x/((1-x)*(1+3*x)).
a(n) = -(-1)^n*A015518(n).
a(n) = the (1, 2)-th element of M^n, where M = ((1, 1, 1, -2), (1, 1, -2, 1), (1, -2, 1, 1), (-2, 1, 1, 1)). - Simone Severini, Nov 25 2004
a(0)=0, a(1)=1, a(n) = -2*a(n-1) + 3*a(n-2) for n>1. - Philippe Deléham, Sep 19 2009
From Sergei N. Gladkovskii, Apr 29 2012: (Start)
G.f. A(x) = G(0)/4; G(k) = 1 - 1/(3^(2*k) - 3*x*3^(4*k)/(3*x*3^(2*k) + 1/(1 + 1/(3*3^(2*k) - 3^(3)*x*3^(4*k)/(3^2*x*3^(2*k) - 1/G(k+1)))))); (continued fraction, 3rd kind, 6-step).
E.g.f. E(x) = G(0)/4; G(k) = 1 - 1/(9^k - 3*x*81^k/(3*x*9^k + (2*k+1)/(1 + 1/(3*9^k - 27*x*81^k/(9*x*9^k - (2*k+2)/G(k+1)))))); (continued fraction, 3rd kind, 6-step). (End)
a(n) = A084222(n) - 1. - Filip Zaludek, Nov 19 2016
E.g.f.: sinh(x)*cosh(x)*exp(-x). - Ilya Gutkovskiy, Nov 20 2016

A014987 a(n) = (1 - (-6)^n)/7.

Original entry on oeis.org

1, -5, 31, -185, 1111, -6665, 39991, -239945, 1439671, -8638025, 51828151, -310968905, 1865813431, -11194880585, 67169283511, -403015701065, 2418094206391, -14508565238345, 87051391430071, -522308348580425, 3133850091482551
Offset: 1

Views

Author

Keywords

Comments

q-integers for q=-6.
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=-5, (i>1), A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n-1)=(-1)^n*charpoly(A,2). - Milan Janjic, Jan 27 2010

Crossrefs

Absolute values are in A015540.

Programs

  • Magma
    I:=[1,-5]; [n le 2 select I[n] else -5*Self(n-1)+6*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Oct 22 2012
    
  • Maple
    a:=n->sum ((-6)^j, j=0..n): seq(a(n), n=0..25); # Zerinvary Lajos, Dec 16 2008
  • Mathematica
    LinearRecurrence[{-5, 6}, {1, -5}, 30] (* Vincenzo Librandi Oct 22 2012 *)
  • PARI
    a(n)=(1-(-6)^n)/7 \\ Charles R Greathouse IV, Sep 24 2015
  • Sage
    [gaussian_binomial(n,1,-6) for n in range(1,22)] # Zerinvary Lajos, May 28 2009
    

Formula

a(n) = a(n-1) + q^(n-1) = (q^n - 1) / (q - 1).
G.f.: x/((1+6*x)*(1-x)).
a(n) = -5*a(n-1) + 6*a(n-2). - Vincenzo Librandi Oct 22 2012
E.g.f.: (exp(x) - exp(-6*x))/7. - G. C. Greubel, May 26 2018

Extensions

Better name from Ralf Stephan, Jul 14 2013

A037481 Base 4 digits are, in order, the first n terms of the periodic sequence with initial period 1,2.

Original entry on oeis.org

0, 1, 6, 25, 102, 409, 1638, 6553, 26214, 104857, 419430, 1677721, 6710886, 26843545, 107374182, 429496729, 1717986918, 6871947673, 27487790694, 109951162777, 439804651110, 1759218604441, 7036874417766, 28147497671065
Offset: 0

Views

Author

Keywords

Comments

The terms have a particular pattern in their binary expansion, which encodes for a "triangular partition" when runlength encoding of unordered partitions are used (please see A129594 for how that encoding works).
n a(n) same in binary run lengths unordered partition
0 0 0 [] {}
1 1 1 [1] {1}
2 6 110 [2,1] {1+2}
3 25 11001 [2,2,1] {1+2+3}
4 102 1100110 [2,2,2,1] {1+2+3+4}
5 409 110011001 [2,2,2,2,1] {1+2+3+4+5}
6 1638 11001100110 [2,2,2,2,2,1] {1+2+3+4+5+6}
7 6553 1100110011001 [2,2,2,2,2,2,1] {1+2+3+4+5+6+7}
8 26214 110011001100110 [2,2,2,2,2,2,2,1] {1+2+3+4+5+6+7+8}
9 104857 11001100110011001 [2,2,2,2,2,2,2,2,1] {1+2+3+4+5+6+7+8+9}
These partitions are the only fixed points of "Bulgarian Solitaire" operation (see Gardner reference or Wikipedia page), and thus the terms of this sequence give the fixed points for A226062 which implements that operation (using the same encoding for partitions). This also implies that these partitions are the roots of the game trees constructed for decks consisting of 1+2+3+...+k cards. See A227451 for the encoding of the corresponding tops of the main trunks of the same trees. - Antti Karttunen, Jul 12 2013

References

  • Martin Gardner, Colossal Book of Mathematics, Chapter 34, Bulgarian Solitaire and Other Seemingly Endless Tasks, pp. 455-467, W. W. Norton & Company, 2001.

Crossrefs

Cf. A037487 (decimal digits 1,2).
The right edge of the table A227452. The fixed points of A226062.

Programs

  • Magma
    I:=[0, 1, 6]; [n le 3 select I[n] else 4*Self(n-1)+Self(n-2)-4*Self(n-3): n in [1..30]]; // Vincenzo Librandi, Jun 21 2012
    
  • Mathematica
    LinearRecurrence[{4,1,-4},{0,1,6},40] (* Vincenzo Librandi, Jun 21 2012 *)
    Module[{nn=30,ps},ps=PadRight[{},nn,{1,2}];Table[FromDigits[Take[ps,n],4],{n,0,nn}]] (* Harvey P. Dale, Jul 18 2013 *)
  • PARI
    concat(0, Vec(x*(2*x+1)/((x-1)*(x+1)*(4*x-1)) + O(x^100))) \\ Colin Barker, Apr 30 2014
    
  • PARI
    a(n) = 2<<(2*n) \ 5; \\ Kevin Ryde, Jun 24 2023
    
  • Python
    def A037481(n): return (1<<(n<<1|1))//5 # Chai Wah Wu, Jun 28 2023
  • Scheme
    (define (A037481 n) (/ (- (/ (+ (expt 4 (1+ n)) (expt -1 n)) 5) 1) 2)) ;; Using Ralf Stephan's direct formula - Antti Karttunen, Jul 12 2013
    

Formula

a(n) = ((4^(n+1) - (-1)^(n+1))/5 - 1)/2. - Ralf Stephan
a(n) = 4*a(n-1) + a(n-2) - 4*a(n-3). - Vincenzo Librandi, Jun 21 2012
a(n) = A226062(A129594(A227451(n))). [See page 465 in Gardner's book] - Antti Karttunen, Jul 12 2013
G.f.: x*(2*x+1) / ((x-1)*(x+1)*(4*x-1)). - Colin Barker, Apr 30 2014

A015112 Triangle of q-binomial coefficients for q=-4.

Original entry on oeis.org

1, 1, 1, 1, -3, 1, 1, 13, 13, 1, 1, -51, 221, -51, 1, 1, 205, 3485, 3485, 205, 1, 1, -819, 55965, -219555, 55965, -819, 1, 1, 3277, 894621, 14107485, 14107485, 894621, 3277, 1, 1, -13107, 14317213, -901984419, 3625623645, -901984419, 14317213, -13107, 1, 1
Offset: 0

Views

Author

Keywords

Comments

May be read as a symmetric triangular (T[n,k]=T[n,n-k]; k=0,...,n; n=0,1,...) or square array (A[n,r]=A[r,n]=T[n+r,r], read by antidiagonals). The diagonals of the former (or rows/columns of the latter) are A000012 (k=0), A014985 (k=1), A015253 (k=2), A015271, A015289, A015308, A015326, A015341, A015359, A015376, A015390 (k=10), A015408, A015425,... - M. F. Hasler, Nov 04 2012

Crossrefs

Cf. analog triangles for other q: A015109 (q=-2), A015110 (q=-3), A015113 (q=-5), A015116 (q=-6), A015117 (q=-7), A015118 (q=-8), A015121 (q=-9), A015123 (q=-10), A015124 (q=-11), A015125 (q=-12), A015129 (q=-13), A015132 (q=-14), A015133 (q=-15); A022166 (q=2), A022167 (q=3), A022168, A022169, A022170, A022171, A022172, A022173, A022174 (q=10), A022175, A022176, A022177, A022178, A022179, A022180, A022181, A022182, A022183, A022184 (q=20), A022185, A022186, A022187, A022188. - M. F. Hasler, Nov 04 2012

Programs

  • Mathematica
    Flatten[Table[QBinomial[n,m,-4],{n,0,10},{m,0,n}]] (* Harvey P. Dale, Jun 10 2015 *)
  • PARI
    T015112(n, k, q=-4)=prod(i=1, k, (q^(1+n-i)-1)/(q^i-1)) \\ (Indexing is that of the triangular array: 0 <= k <= n = 0,1,2,...) - M. F. Hasler, Nov 04 2012

A014986 a(n) = (1 - (-5)^n)/6.

Original entry on oeis.org

1, -4, 21, -104, 521, -2604, 13021, -65104, 325521, -1627604, 8138021, -40690104, 203450521, -1017252604, 5086263021, -25431315104, 127156575521, -635782877604, 3178914388021, -15894571940104, 79472859700521
Offset: 1

Views

Author

Keywords

Comments

q-integers for q = -5.
Let A be the Hessenberg matrix of order n, defined by: A[1,j]=1, A[i,i]:=-5, (i>1), A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=1, a(n)=det(A). - Milan Janjic, Jan 27 2010

Crossrefs

Programs

  • Magma
    I:=[1, -4]; [n le 2 select I[n] else -4*Self(n-1)+5*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Jun 19 2012
  • Maple
    a:=n->sum ((-5)^j, j=0..n): seq(a(n), n=0..25); # Zerinvary Lajos, Dec 16 2008
  • Mathematica
    LinearRecurrence[{-4,5},{1,-4},30] (* Vincenzo Librandi, Jun 19 2012 *)
  • PARI
    a(n)=(1-(-5)^n)/6 \\ Charles R Greathouse IV, Dec 07 2011
    
  • Sage
    [gaussian_binomial(n,1,-5) for n in range(1,22)] # Zerinvary Lajos, May 28 2009
    

Formula

a(n) = a(n-1) + q^(n-1) = (q^n - 1) / (q - 1).
G.f.: x/((1-x)*(1+5*x)). - Bruno Berselli, Dec 07 2011
a(n) = -4*a(n-1) + 5*a(n-2). - Vincenzo Librandi, Jun 19 2012
E.g.f.: (exp(x) - exp(-5*x))/6. - G. C. Greubel, May 26 2018

Extensions

Better name from Ralf Stephan, Jul 14 2013

A014989 a(n) = (1 - (-7)^n)/8.

Original entry on oeis.org

1, -6, 43, -300, 2101, -14706, 102943, -720600, 5044201, -35309406, 247165843, -1730160900, 12111126301, -84777884106, 593445188743, -4154116321200, 29078814248401, -203551699738806, 1424861898171643, -9974033287201500
Offset: 1

Views

Author

Keywords

Comments

q-integers for q = -7.

Crossrefs

Programs

  • Magma
    I:=[1,-6]; [n le 2 select I[n] else -6*Self(n-1)+7*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Oct 22 2012
    
  • Maple
    a:=n->sum ((-7)^j, j=0..n): seq(a(n), n=0..25); # Zerinvary Lajos, Dec 16 2008
  • Mathematica
    LinearRecurrence[{-6, 7}, {1, -6}, 30] (* Vincenzo Librandi, Oct 22 2012 *)
  • PARI
    x='x+O('x^30); Vec(x/((1-x)*(1+7*x))) \\ G. C. Greubel, May 26 2018
  • Sage
    [gaussian_binomial(n,1,-7) for n in range(1,21)] # Zerinvary Lajos, May 28 2009
    

Formula

a(n) = a(n-1) + q^(n-1) = (q^n - 1) / (q - 1).
a(n) = -6*a(n-1) + 7*a(n-2). - Vincenzo Librandi, Oct 22 2012
From G. C. Greubel, May 26 2018: (Start)
G.f.: x/((1-x)*(1+7*x)).
E.g.f.: (exp(x) - exp(-7*x))/8. (End)

Extensions

Better name from Ralf Stephan, Jul 14 2013

A014994 a(n) = (1 - (-12)^n)/13.

Original entry on oeis.org

1, -11, 133, -1595, 19141, -229691, 2756293, -33075515, 396906181, -4762874171, 57154490053, -685853880635, 8230246567621, -98762958811451, 1185155505737413, -14221866068848955, 170662392826187461
Offset: 1

Views

Author

Keywords

Comments

q-integers for q=-12.

Crossrefs

Programs

  • Magma
    I:=[1,-11]; [n le 2 select I[n] else -11*Self(n-1)+12*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Oct 22 2012
    
  • Maple
    a:=n->sum ((-12)^j, j=0..n): seq(a(n), n=0..25); # Zerinvary Lajos, Dec 16 2008
  • Mathematica
    LinearRecurrence[{-11, 12}, {1, -11}, 30] (* Vincenzo Librandi, Oct 22 2012 *)
  • PARI
    a(n)=(1-(-12)^n)/13 \\ Charles R Greathouse IV, Sep 24 2015
  • Sage
    [gaussian_binomial(n,1,-12) for n in range(1,18)] # Zerinvary Lajos, May 28 2009
    

Formula

a(n) = a(n-1) + q^(n-1) = (q^n - 1) / (q - 1).
G.f.: x/((1 - x)*(1 + 12*x)). - Vincenzo Librandi, Oct 22 2012
a(n) = -11*a(n-1) + 12*a(n-2). - Vincenzo Librandi, Oct 22 2012
E.g.f.: (exp(x) - exp(-12*x))/13. - G. C. Greubel, May 26 2018

Extensions

Better name from Ralf Stephan, Jul 14 2013

A015359 Gaussian binomial coefficient [ n,8 ] for q=-4.

Original entry on oeis.org

1, 52429, 3665049245, 236497451900765, 15559876852907031645, 1018737244037427165087837, 66780267552779682073190144093, 4376244513647234644625387176712285, 286805936690898816904813999400193022045
Offset: 8

Views

Author

Keywords

References

  • J. Goldman and G.-C. Rota, The number of subspaces of a vector space, pp. 75-83 of W. T. Tutte, editor, Recent Progress in Combinatorics. Academic Press, NY, 1969.
  • I. P. Goulden and D. M. Jackson, Combinatorial Enumeration. Wiley, NY, 1983, p. 99.
  • M. Sved, Gaussians and binomials, Ars. Combinatoria, 17A (1984), 325-351.

Crossrefs

Cf. A015356, A015357, A015360, A015361, A015363, A015364, A015365, A015367 A015368, A015369, A015370 (r=8, q=-2..-13). q=-4 integers/coefficients: A014985 (r=1), A015253 (r=2), A015271 (r=3), A015289 (r=4), A015308 (r=5), A015326 (r=6), A015341 (r=7), A015376 (r=9), A015390 (r=10), A015408 (r=11), A015425 (r=12). - M. F. Hasler, Nov 03 2012

Programs

  • Magma
    r:=8; q:=-4; [&*[(1-q^(n-i+1))/(1-q^i): i in [1..r]]: n in [r..18]]; // Vincenzo Librandi, Nov 03 2012
    
  • Mathematica
    Table[QBinomial[n, 8, -4], {n, 8, 20}] (* Vincenzo Librandi, Nov 02 2012 *)
  • PARI
    A015359(n,r=8,q=-4)=prod(i=1,r,(q^(n-i+1)-1)/(q^i-1)) \\ M. F. Hasler, Nov 03 2012
  • Sage
    [gaussian_binomial(n,8,-4) for n in range(8,16)] # Zerinvary Lajos, May 25 2009
    

Formula

a(n) = Product_{i=1..8} ((-4)^(n-i+1)-1)/((-4)^i-1). - M. F. Hasler, Nov 03 2012
G.f.: -x^8 / ( (x-1)*(16384*x+1)*(4096*x-1)*(256*x-1)*(65536*x-1)*(64*x+1)*(4*x+1)*(16*x-1)*(1024*x+1) ). - R. J. Mathar, Sep 02 2016

A014990 a(n) = (1 - (-8)^n)/9.

Original entry on oeis.org

1, -7, 57, -455, 3641, -29127, 233017, -1864135, 14913081, -119304647, 954437177, -7635497415, 61083979321, -488671834567, 3909374676537, -31274997412295, 250199979298361, -2001599834386887, 16012798675095097
Offset: 1

Views

Author

Keywords

Comments

q-integers for q=-8.

Crossrefs

Programs

  • Magma
    I:=[1, -7]; [n le 2 select I[n] else -7*Self(n-1) +8*Self(n-2): n in [1..30]]; // Vincenzo Librandi, Oct 22 2012
    
  • Maple
    a:=n->sum ((-8)^j, j=0..n): seq(a(n), n=0..25); # Zerinvary Lajos, Dec 16 2008
  • Mathematica
    QBinomial[Range[20],1,-8] (* or *) LinearRecurrence[{-7,8},{1,-7},20] (* Harvey P. Dale, Dec 19 2011 *)
  • PARI
    a(n)=(1-(-8)^n)/9 \\ Charles R Greathouse IV, Oct 07 2015
  • Sage
    [gaussian_binomial(n,1,-8) for n in range(1,20)] # Zerinvary Lajos, May 28 2009
    

Formula

a(n) = a(n-1) + q^{(n-1)} = {(q^n - 1) / (q - 1)}
From Philippe Deléham, Feb 13 2007: (Start)
a(1)=1, a(2)=-7, a(n) = -7*a(n-1) + 8*a(n-2) for n > 2.
a(n) = (-1)^(n+1)*A015565(n).
G.f.: x/(1 + 7*x - 8*x^2). (End)
E.g.f.: (exp(x) - exp(-8*x))/9. - G. C. Greubel, May 26 2018

Extensions

Better name from Ralf Stephan, Jul 14 2013
Showing 1-10 of 19 results. Next