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 11 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

A130472 A permutation of the integers: a(n) = (-1)^n * floor( (n+1)/2 ).

Original entry on oeis.org

0, -1, 1, -2, 2, -3, 3, -4, 4, -5, 5, -6, 6, -7, 7, -8, 8, -9, 9, -10, 10, -11, 11, -12, 12, -13, 13, -14, 14, -15, 15, -16, 16, -17, 17, -18, 18, -19, 19, -20, 20, -21, 21, -22, 22, -23, 23, -24, 24, -25, 25, -26, 26, -27, 27, -28, 28, -29, 29, -30, 30, -31, 31, -32, 32
Offset: 0

Views

Author

Clark Kimberling, May 28 2007

Keywords

Comments

Pisano period lengths: 1, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, ... - R. J. Mathar, Aug 10 2012
Partial sums of A038608. - Stanislav Sykora, Nov 27 2013

Crossrefs

Sums of the form Sum_{k=0..n} k^p * q^k: A059841 (p=0,q=-1), this sequence (p=1,q=-1), A089594 (p=2,q=-1), A232599 (p=3,q=-1), A126646 (p=0,q=2), A036799 (p=1,q=2), A036800 (p=2,q=2), A036827 (p=3,q=2), A077925 (p=0,q=-2), A232600 (p=1,q=-2), A232601 (p=2,q=-2), A232602 (p=3,q=-2), A232603 (p=2,q=-1/2), A232604 (p=3,q=-1/2).

Programs

Formula

a(n) = -A001057(n).
a(2n) = n, a(2n+1) = -(n+1).
a(n) = Sum_{k=0..n} k*(-1)^k.
a(n) = -a(n-1) +a(n-2) +a(n-3).
G.f.: -x/( (1-x)*(1+x)^2 ). - R. J. Mathar, Feb 20 2011
a(n) = floor( (n/2)*(-1)^n ). - Wesley Ivan Hurt, Jun 14 2013
a(n) = ceiling( n/2 )*(-1)^n. - Wesley Ivan Hurt, Oct 22 2013
a(n) = ((-1)^n*(2*n+1) - 1)/4. - Adriano Caroli, Mar 28 2015
E.g.f.: (1/4)*(-exp(x) + (1-2*x)*exp(-x) ). - G. C. Greubel, Mar 31 2021

A036799 a(n) = 2 + 2^(n+1)*(n-1).

Original entry on oeis.org

0, 2, 10, 34, 98, 258, 642, 1538, 3586, 8194, 18434, 40962, 90114, 196610, 425986, 917506, 1966082, 4194306, 8912898, 18874370, 39845890, 83886082, 176160770, 369098754, 771751938, 1610612738, 3355443202, 6979321858, 14495514626, 30064771074, 62277025794
Offset: 0

Views

Author

Keywords

Comments

This sequence is a part of a class of sequences of the type: a(n) = Sum_{i=0..n} (C^i)*(i^k). This sequence has C=2, k=1. Sequence A036800 has C=2, k=2. Suppose C >= 2, k >= 1 are integers. What is the general closed form for a(n)? - Ctibor O. Zizka, Feb 07 2008
Partial sums of A036289. - Vladimir Joseph Stephan Orlovsky, Jul 09 2011
a(n) is the number of swaps needed in the worst case, when successively inserting 2^(n+1) - 1 keys into an initially empty binary heap (thus creating a tree with n+1 full levels). - Rudy van Vliet, Nov 09 2015
a(n) is also the total path length of the complete binary tree of height n, with nodes at depths 0,...,n. Total path length is defined to be the sum of depths over all nodes. - F. Skerman, Jul 02 2017
For n >= 1, every number greater than or equal to a(n-1) can be written as a sum of (not necessarily distinct) numbers of the form 2^n - 2^k with 0 <= k < n. However, a(n-1) - 1 cannot be written in this way. See problem N1 from the 2014 International Mathematics Olympiad Shortlist. - Dylan Nelson, Jun 02 2023

References

  • M. Petkovsek et al., A=B, Peters, 1996, p. 97.

Crossrefs

Programs

Formula

a(n) = (n-1) * 2^(n+1) + 2.
a(n) = 2 * A000337(n).
a(n) = Sum_{k=1..n} k*2^k. - Benoit Cloitre, Oct 25 2002
G.f.: 2*x/((1-x)*(1-2*x)^2). - Colin Barker, Apr 30 2012
a(n) = 5*a(n-1) - 8*a(n-2) + 4*a(n-3) for n > 2. - Wesley Ivan Hurt, Nov 12 2015
a(n) = Sum_{k=0..n} Sum_{i=0..n} k * binomial(k,i). - Wesley Ivan Hurt, Sep 21 2017
E.g.f.: 2*exp(x) - 2*(1-2*x)*exp(2*x). - G. C. Greubel, Mar 29 2021

A232599 Alternating sum of cubes, i.e., Sum_{k=0..n} k^p*q^k for p=3, q=-1.

Original entry on oeis.org

0, -1, 7, -20, 44, -81, 135, -208, 304, -425, 575, -756, 972, -1225, 1519, -1856, 2240, -2673, 3159, -3700, 4300, -4961, 5687, -6480, 7344, -8281, 9295, -10388, 11564, -12825, 14175, -15616, 17152, -18785, 20519
Offset: 0

Views

Author

Stanislav Sykora, Nov 26 2013

Keywords

Examples

			a(3) = 0^3 - 1^3 + 2^3 - 3^3 = -20.
		

Crossrefs

Cf. A000578 (cubes), A011934 (absolute values), A059841 (p=0,q=-1), A130472 (p=1,q=-1), A089594 (p=2,q=-1), A126646 (p=0,q=2), A036799 (p=1,q=2), A036800 (p=2,q=2), A036827 (p=3,q=2), A077925 (p=0,q=-2), A232600 (p=1,q=-2), A232601 (p=2,q=-2), A232602 (p=3,q=-2), A232603 (p=2,q=-1/2), A232604 (p=3,q=-1/2).

Programs

  • Magma
    [(1 - (-1)^n*(1 -6*n^2 -4*n^3))/8: n in [0..30]]; // G. C. Greubel, Mar 31 2021
    
  • Maple
    A232599:= n-> (1 -(-1)^n*(1 -6*n^2 -4*n^3))/8; seq(A232599(n), n=0..30); # G. C. Greubel, Mar 31 2021
  • Mathematica
    Accumulate[Times@@@Partition[Riffle[Range[0,40]^3,{1,-1},{2,-1,2}],2]] (* Harvey P. Dale, Jul 22 2016 *)
  • PARI
    S3M1(n)=((-1)^n*(4*n^3+6*n^2-1)+1)/8;
    v = vector(10001);for(k=1,#v,v[k]=S3M1(k-1))
    
  • Sage
    [(1 - (-1)^n*(1 -6*n^2 -4*n^3))/8 for n in (0..30)] # G. C. Greubel, Mar 31 2021

Formula

a(n) = ((-1)^n*(4*n^3+6*n^2-1) +1)/8.
G.f.: (-x)*(1-4*x+x^2) / ( (1-x)*(1+x)^4 ). - R. J. Mathar, Nov 23 2014
E.g.f.: (exp(x) - (1 +10*x -18*x^2 +4*x^3)*exp(-x))/8. - G. C. Greubel, Mar 31 2021
a(n) = - 3*a(n-1) - 2*a(n-2) + 2*a(n-3) + 3*a(n-4) + a(n-5). - Wesley Ivan Hurt, Mar 31 2021

A089594 Alternating sum of squares to n.

Original entry on oeis.org

-1, 3, -6, 10, -15, 21, -28, 36, -45, 55, -66, 78, -91, 105, -120, 136, -153, 171, -190, 210, -231, 253, -276, 300, -325, 351, -378, 406, -435, 465, -496, 528, -561, 595, -630, 666, -703, 741, -780, 820, -861, 903, -946, 990, -1035, 1081, -1128, 1176, -1225, 1275
Offset: 1

Views

Author

Jon Perry, Dec 30 2003

Keywords

Comments

Let A be the Hessenberg n X n matrix defined by: A[1,j]=j mod 2, A[i,i]:=1, A[i,i-1]=-1, and A[i,j]=0 otherwise. Then, for n>=3, a(n-1)=(-1)^(n-1)*coeff(charpoly(A,x),x^(n-2)). - Milan Janjic, Jan 24 2010
Also triangular numbers with alternating signs. - Stanislav Sykora, Nov 26 2013

Examples

			a(6) = 1 + 4 - 9 + 16 - 25 + 36 = 3 + 7 + 11 = 21.
		

Crossrefs

Cf. A059841 (p=0,q=-1), A130472 (p=1,q=-1), this sequence (p=2,q=-1), A232599 (p=3,q=-1), A126646 (p=0,q=2), A036799 (p=1,q=2), A036800 (p=2,q=2), A036827 (p=3,q=2), A077925 (p=0,q=-2), A232600 (p=1,q=-2), A232601 (p=2,q=-2), A232602 (p=3,q=-2), A232603 (p=2,q=-1/2), A232604 (p=3,q=-1/2).
Cf. A000217.
Cf. A225144. [Bruno Berselli, Jun 06 2013]

Programs

Formula

From R. J. Mathar, Nov 05 2011: (Start)
a(n) = Sum_{i=1..n} (-1)^i*i^2 = (-1)^n*n*(n+1)/2.
G.f.: -x / (1+x)^3. (End)
a(n) = (-1)^n*det(binomial(i+2,j+1), 1 <= i,j <= n-1). - Mircea Merca, Apr 06 2013
G.f.: -W(0)/(2+2*x), where W(k) = 1 + 1/( 1 - x*(k+2)/( x*(k+2) - (k+1)/W(k+1) )); (continued fraction). - Sergei N. Gladkovskii, Aug 19 2013
E.g.f.: (1/2)*x*(x-2)*exp(-x). - G. C. Greubel, Mar 31 2021
Sum_{n>=1} 1/a(n) = 2 - 4*log(2). - Amiram Eldar, Jan 31 2023

A036800 a(n) = -6 + 2^(n+1)*(3 - 2*n + n^2).

Original entry on oeis.org

0, 2, 18, 90, 346, 1146, 3450, 9722, 26106, 67578, 169978, 417786, 1007610, 2392058, 5603322, 12976122, 29753338, 67633146, 152567802, 341835770, 761266170, 1686110202, 3716153338, 8153726970, 17817403386, 38788923386
Offset: 0

Views

Author

Keywords

Comments

This sequence is a part of a class of sequences of the type: a(n) = sum(i=0,n,(C^i)*(i^k)). This sequence has C=2, k=2. Sequence A036799 has C=2, k=1. Suppose C>=2, k>=1 are integers. What is the general closed form for a(n)? - Ctibor O. Zizka, Feb 07 2008

References

  • M. Petkovsek et al., A=B, Peters, 1996, p. 97.
  • Jolley, Summation of Series, Dover (1961), p. 6.

Crossrefs

Programs

Formula

a(n) = Sum_{k=0..n} 2^k * k^2. - Benoit Cloitre, Jun 11 2003
From R. J. Mathar, Oct 03 2011: (Start)
G.f.: 2*x*(1+2*x) / ( (1-x)*(1-2*x)^3 ).
a(n) = 2*A036826(n). (End)
a(0)=0, a(1)=2, a(2)=18, a(3)=90, a(n)=7*a(n-1)-18*a(n-2)+ 20*a(n-3)- 8*a(n-4). - Harvey P. Dale, Jun 13 2015
a(n) = Sum_{k=0..n} Sum_{i=0..n} k^2 * C(k,i). - Wesley Ivan Hurt, Sep 21 2017
E.g.f.: 2*(3 -2*x +4*x^2)*exp(2*x) -6*exp(x). - G. C. Greubel, Mar 31 2021

A232601 a(n) = Sum_{k=0..n} k^p*q^k for p = 2 and q = -2.

Original entry on oeis.org

0, -2, 14, -58, 198, -602, 1702, -4570, 11814, -29658, 72742, -175066, 414758, -969690, 2241574, -5131226, 11645990, -26233818, 58700838, -130567130, 288863270, -635980762, 1394062374, -3043511258, 6620165158
Offset: 0

Views

Author

Stanislav Sykora, Nov 27 2013

Keywords

Examples

			a(3) = 0^2*2^0 - 1^2*2^1 + 2^2*2^2 - 3^2*2^3 = -58.
		

Crossrefs

Cf. A059841 (p=0,q=-1), A130472 (p=1,q=-1), A089594 (p=2,q=-1), A232599 (p=3,q=-1), A126646 (p=0,q=2), A036799 (p=1,q=2), A036800 (p=2,q=2), A036827 (p=3,q=2), A077925 (p=0,q=-2), A232600 (p=1,q=-2), A232602 (p=3,q=-2), A232603 (p=2,q=-1/2), A232604 (p=3,q=-1/2).

Programs

  • Magma
    [2*(1 - (-2)^n*(1-6*n-9*n^2))/27: n in [0..30]]; // G. C. Greubel, Mar 31 2021
    
  • Maple
    A232601:= n-> 2*(1 - (-2)^n*(1-6*n-9*n^2))/27; seq(A232601(n), n=0..30); # G. C. Greubel, Mar 31 2021
  • Mathematica
    LinearRecurrence[{-5,-6,4,8},{0,-2,14,-58},30] (* Harvey P. Dale, Aug 20 2015 *)
  • PARI
    S2M2(n)=((-1)^n*2^(n+1)*(9*n^2+6*n-1)+2)/27;
    v = vector(10001); for(k=1, #v, v[k]=S2M2(k-1))
    
  • Sage
    [2*(1 - (-2)^n*(1-6*n-9*n^2))/27 for n in (0..30)] # G. C. Greubel, Mar 31 2021

Formula

a(n) = 2*((-2)^n * (9*n^2 + 6*n - 1) + 1)/27.
G.f.: 2*x*(-1 + 2*x) / ((1-x)*(1+2*x)^3). - R. J. Mathar, Nov 23 2014
E.g.f.: (2/27)*(exp(x) - (1 +30*x -36*x^2)*exp(-2*x)). - G. C. Greubel, Mar 31 2021
a(n) = - 5*a(n-1) - 6*a(n-2) + 4*a(n-3) + 8*a(n-4). - Wesley Ivan Hurt, Mar 31 2021

A232602 a(n) = Sum_{k=0..n} k^p*q^k, where p=3, q=-2.

Original entry on oeis.org

0, -2, 30, -186, 838, -3162, 10662, -33242, 97830, -275418, 748582, -1977306, 5100582, -12897242, 32060454, -78531546, 189903910, -454052826, 1074770982, -2521320410, 5867287590, -13554437082
Offset: 0

Views

Author

Stanislav Sykora, Nov 27 2013

Keywords

Examples

			a(3) = 0^3*2^0 - 1^3*2^1 + 2^3*2^2 - 3^3*2^3 = -186.
		

Crossrefs

Cf. A059841 (p=0,q=-1), A130472 (p=1,q=-1), A089594 (p=2,q=-1), A232599 (p=3,q=-1), A126646 (p=0,q=2), A036799 (p=1,q=2), A036800 (p=2,q=2), A036827 (p=3,q=2), A077925 (p=0,q=-2), A232600 (p=1,q=-2), A232601 (p=2,q=-2), A232603 (p=2,q=-1/2), A232604 (p=3,q=-1/2).

Programs

  • Magma
    [2*(1 -(-2)^n*(1 +3*n -9*n^2 -9*n^3))/27: n in [0..35]]; // G. C. Greubel, Mar 31 2021
    
  • Maple
    A232602:= n-> 2*(1 -(-2)^n*(1 +3*n -9*n^2 -9*n^3))/27; seq(A232602(n), n=0..35); # G. C. Greubel, Mar 31 2021
  • Mathematica
    LinearRecurrence[{-7,-16,-8,16,16}, {0,-2,30,-186,838}, 40] (* G. C. Greubel, Mar 31 2021 *)
  • PARI
    a(n)=((-1)^n*2^(n+1)*(27*n^3+27*n^2-9*n-3)+6)/81;
    
  • Sage
    [2*(1 -(-2)^n*(1 +3*n -9*n^2 -9*n^3))/27 for n in (0..35)] # G. C. Greubel, Mar 31 2021

Formula

a(n) = 2*(1 - (-2)^n*(1 +3*n -9*n^2 -9*n^3))/27.
G.f.: -2*x*(1-8*x+4*x^2) / ( (1-x)*(1+2*x)^4 ). - R. J. Mathar, Nov 23 2014
E.g.f.: (2/27)*(exp(x) - (1 +30*x -144*x^2 +72*x^3)*exp(-2*x)). - G. C. Greubel, Mar 31 2021
a(n) = - 7*a(n-1) - 16*a(n-2) - 8*a(n-3) + 16*a(n-4) + 16*a(n-5). - Wesley Ivan Hurt, Mar 31 2021

A232603 a(n) = 2^n * Sum_{k=0..n} k^p*q^k, where p=2, q=-1/2.

Original entry on oeis.org

0, -1, 2, -5, 6, -13, 10, -29, 6, -69, -38, -197, -250, -669, -1142, -2509, -4762, -9813, -19302, -38965, -77530, -155501, -310518, -621565, -1242554, -2485733, -4970790, -9942309, -19883834, -39768509, -79536118
Offset: 0

Views

Author

Stanislav Sykora, Nov 27 2013

Keywords

Comments

The factor 2^n (i.e., |1/q|^n) is present to keep the values integer.
See also A232600 and references therein for integer values of q.

Examples

			a(3) = 2^3 * [0^2/2^0 - 1^2/2^1 + 2^2/2^2 - 3^2/2^3] = -5.
		

Crossrefs

Cf. A001045 (p=0,q=-1/2), A053088 (p=1,q=-1/2), A232604 (p=3,q=-1/2), A000225 (p=0,q=1/2), A000295 and A125128 (p=1,q=1/2), A047520 (p=2,q=1/2), A213575 (p=3,q=1/2), A232599 (p=3,q=-1), A232600 (p=1,q=-2), A232601 (p=2,q=-2), A232602 (p=3,q=-2).

Programs

  • Magma
    [((-1)^n*(2+12*n+9*n^2) -2^(n+1))/27: n in [0..30]]; // G. C. Greubel, Mar 31 2021
    
  • Maple
    A232603:= n-> ((-1)^n*(2+12*n+9*n^2) -2^(n+1))/27; seq(A232603(n), n=0..35); # G. C. Greubel, Mar 31 2021
  • Mathematica
    LinearRecurrence[{-1,3,5,2}, {0,-1,2,-5}, 35] (* G. C. Greubel, Mar 31 2021 *)
  • PARI
    a(n)=((-1)^n*(9*n^2+12*n+2)-2^(n+1))/27;
    
  • Sage
    [((-1)^n*(2+12*n+9*n^2) -2^(n+1))/27 for n in (0..30)] # G. C. Greubel, Mar 31 2021

Formula

a(n) = ((-1)^n*(9*n^2+12*n+2) - 2^(n+1))/27.
G.f.: x*(-1+x)/( (1-2*x)*(1+x)^3 ). - R. J. Mathar, Nov 23 2014
E.g.f.: (1/27)*(-2*exp(2*x) + (2 -21*x +9*x^2)*exp(-x)). - G. C. Greubel, Mar 31 2021
a(n) = - a(n-1) + 3*a(n-2) + 5*a(n-3) + 2*a(n-4). - Wesley Ivan Hurt, Mar 31 2021

A232604 a(n) = 2^n * Sum_{k=0..n} k^p*q^k, where p=3, q=-1/2.

Original entry on oeis.org

0, -1, 6, -15, 34, -57, 102, -139, 234, -261, 478, -375, 978, -241, 2262, 1149, 6394, 7875, 21582, 36305, 80610, 151959, 314566, 616965, 1247754, 2479883, 4977342, 9935001, 19891954, 39759519, 79546038, 159062285
Offset: 0

Views

Author

Stanislav Sykora, Nov 27 2013

Keywords

Comments

The factor 2^n (i.e., |1/q|^n) is present to make the values integers.
See also A232600 and references therein for integer values of q.
The same values with different signs are produced by a(n) = n^3 - 2*a(n). The signs are all positive until n = 15, with negative signs on values for all subsequent odd indices. - Richard R. Forberg, Feb 17 2014.

Examples

			a(3) = 2^3 * (0^3/2^0 - 1^3/2^1 + 2^3/2^2 - 3^3/2^3) = 0-4+16-27 = -15.
		

Crossrefs

Cf. A001045 (p=0,q=-1/2), A053088 (p=1,q=-1/2), A232603 (p=2,q=-1/2), A000225 (p=0,q=1/2), A000295 and A125128 (p=1,q=1/2), A047520 (p=2,q=1/2), A213575 (p=3,q=1/2), A232599 (p=3,q=-1), A232600 (p=1,q=-2), A232601 (p=2,q=-2), A232602 (p=3,q=-2).

Programs

  • Magma
    [(2^(n+1) + (-1)^n*(9*n^3 +18*n^2 +6*n -2))/27: n in [0..35]]; // G. C. Greubel, Mar 31 2021
    
  • Maple
    A232604:= n-> (2^(n+1) +(-1)^n*(9*n^3 +18*n^2 +6*n -2))/27; seq(A232604(n), n=0..30); # G. C. Greubel, Mar 31 2021
  • Mathematica
    LinearRecurrence[{-2,2,8,7,2}, {0,-1,6,-15,34}, 35] (* G. C. Greubel, Mar 31 2021 *)
  • PARI
    a(n)=(2^(n+1)+(-1)^n*(9*n^3+18*n^2+6*n-2))/27;
    
  • Sage
    [(2^(n+1) + (-1)^n*(9*n^3 +18*n^2 +6*n -2))/27 for n in (0..35)] # G. C. Greubel, Mar 31 2021

Formula

a(n) = (2^(n+1) + (-1)^n*(9*n^3+18*n^2+6*n-2))/27.
G.f.: x*(1-4*x+x^2) / ( (2*x-1)*(1+x)^4 ). - R. J. Mathar, Nov 23 2014
E.g.f.: (1/27)*(2*exp(2*x) - (2 +33*x -45*x^2 +9*x^3)*exp(-x)). - G. C. Greubel, Mar 31 2021
a(n) = - 2*a(n-1) + 2*a(n-2) + 8*a(n-3) + 7*a(n-4) + 2*a(n-5). - Wesley Ivan Hurt, Mar 31 2021
Showing 1-10 of 11 results. Next