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

A036826 a(n) = A036800(n)/2.

Original entry on oeis.org

0, 1, 9, 45, 173, 573, 1725, 4861, 13053, 33789, 84989, 208893, 503805, 1196029, 2801661, 6488061, 14876669, 33816573, 76283901, 170917885, 380633085, 843055101, 1858076669, 4076863485, 8908701693, 19394461693, 42077257725, 90999619581, 196226318333
Offset: 0

Views

Author

Keywords

Comments

Binomial transform of A054569 (with leading 0). Partial sums of A014477 (with leading 0). - Paul Barry, Jun 11 2003
This sequence is related to A000337 by a(n) = n*A000337(n) - Sum_{i=0..n-1} A000337(i). - Bruno Berselli, Mar 06 2012

Crossrefs

Programs

  • Magma
    m:=28; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!((1+2*x)/((1-x)*(1-2*x)^3))); // Bruno Berselli, Mar 06 2012
    
  • Maple
    A036826:= n-> 2^n*(3-2*n+n^2) -3; seq(A036826(n), n=0..30); # G. C. Greubel, Mar 31 2021
  • Mathematica
    LinearRecurrence[{7,-18,20,-8}, {0,1,9,45}, 29] (* Bruno Berselli, Mar 06 2012 *)
  • PARI
    for(n=0, 28, print1(2^n*(n^2-2*n+3)-3", ")); \\ Bruno Berselli, Mar 06 2012
    
  • Sage
    [2^n*(3-2*n+n^2) -3 for n in (0..30)] # G. C. Greubel, Mar 31 2021

Formula

From Paul Barry, Jun 11 2003: (Start)
G.f.: x*(1+2*x)/((1-x)*(1-2*x)^3).
a(n) = 2^n*(n^2-2*n+3) - 3.
a(n) = Sum_{k=0..n} k^2*2^(k-1). (End)
a(n) = 7*a(n-1) -18*a(n-2) +20*a(n-3) -8*a(n-4). - Harvey P. Dale, Mar 04 2015
E.g.f.: -3*exp(x) + (3 -2*x +4*x^2)*exp(2*x). - G. C. Greubel, Mar 31 2021

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

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

Original entry on oeis.org

0, -2, 6, -18, 46, -114, 270, -626, 1422, -3186, 7054, -15474, 33678, -72818, 156558, -334962, 713614, -1514610, 3203982, -6757490, 14214030, -29826162, 62448526, -130489458, 272163726, -566697074, 1178133390, -2445745266, 5070447502, -10498808946, 21713445774
Offset: 0

Views

Author

Stanislav Sykora, Nov 27 2013

Keywords

Examples

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

Crossrefs

Cf. A045883, A140960 (absolute values), 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=q=2), A036827 (p=3, q=2), A077925 (p=0, 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. A045883.

Programs

  • Magma
    [2*((-2)^n*(3*n+1) -1)/9: n in [0..30]]; // G. C. Greubel, Mar 31 2021
    
  • Maple
    A232600:= n-> 2*((-2)^n*(3*n+1) -1)/9; seq(A232600(n), n=0..30); # G. C. Greubel, Mar 31 2021
  • Mathematica
    Table[2((3n+1)(-2)^n -1)/9, {n, 0, 30}] (* Bruno Berselli, Nov 28 2013 *)
  • PARI
    a(n)=-((3*n+1)*(-2)^(n+1)+2)/9;
    
  • Sage
    [2*((-2)^n*(3*n+1) -1)/9 for n in (0..30)] # G. C. Greubel, Mar 31 2021

Formula

a(n) = 2*( (3*n+1)*(-2)^n - 1 )/9.
abs(a(n)) = 2*A045883(n) = A140960(n).
From Bruno Berselli, Nov 28 2013: (Start)
G.f.: -2*x / ((1 - x)*(1 + 2*x)^2). [corrected by Georg Fischer, May 11 2019]
a(n) = -3*a(n-1) +4*a(n-3). (End)
From G. C. Greubel, Mar 31 2021: (Start)
E.g.f.: (2/9)*(-exp(x) + (1-6*x)*exp(-2*x)).
a(n) = 2*(-1)^n*A045883(n). (End)

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

A036827 a(n) = 26 + 2^(n+1)*(-13 +9*n -3*n^2 +n^3).

Original entry on oeis.org

0, 2, 34, 250, 1274, 5274, 19098, 63002, 194074, 567322, 1591322, 4317210, 11395098, 29392922, 74350618, 184942618, 453378074, 1097334810, 2626158618, 6222250010, 14610858010, 34032582682, 78693531674, 180757725210, 412685959194
Offset: 0

Views

Author

Keywords

Examples

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

References

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

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), this sequence (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

  • Haskell
    a036827 n = 2^(n+1) * (n^3 - 3*n^2 + 9*n - 13) + 26
    -- Reinhard Zumkeller, May 24 2012
    
  • Magma
    [2*(13 + 2^n*(-13 +9*n -3*n^2 +n^3)): n in [0..35]]; // G. C. Greubel, Mar 31 2021
    
  • Maple
    A036827:= n-> 2*(13 + 2^n*(-13 +9*n -3*n^2 +n^3)); seq(A026827(n), n=0..30); # G. C. Greubel, Mar 31 2021
  • Mathematica
    Table[26 +2^(n+1)(-13 +9n -3n^2 +n^3), {n, 0, 30}] (* or *) LinearRecurrence[ {9, -32, 56, -48, 16}, {0, 2, 34, 250, 1274}, 31] (* Harvey P. Dale, Dec 15 2011 *)
  • PARI
    a(n)=26+2^(n+1)*(-13+9*n-3*n^2+n^3) \\ Charles R Greathouse IV, Oct 07 2015
    
  • Sage
    [2*(13 + 2^n*(-13 +9*n -3*n^2 +n^3)) for n in (0..35)] # G. C. Greubel, Mar 31 2021

Formula

a(n) = Sum_{k=0..n} 2^k*k^3. - Benoit Cloitre, Jun 11 2003
G.f.: 2*x*(1 +8*x +4*x^2)/((1-x)*(1-2*x)^4). - Maksym Voznyy (voznyy(AT)mail.ru), Jul 26 2009
a(n) = 9*a(n-1) -32*a(n-2) +56*a(n-3) -48*a(n-4) +16*a(n-5) for n>4 with a(0)=0, a(1)=2, a(2)=34, a(3)=250, a(4)=1274. - Harvey P. Dale, Dec 15 2011
a(n) = Sum_{k=0..n} Sum_{i=0..n} k^3 * C(k,i). - Wesley Ivan Hurt, Sep 21 2017
E.g.f.: 2 (13*exp(x) + (-13 +14*x +8*x^3)*exp(2*x)). - G. C. Greubel, Mar 31 2021

A368486 Square array T(n,k), n >= 0, k >= 0, read by antidiagonals downwards, where T(n,k) = Sum_{j=0..n} k^j * j^k.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 2, 3, 1, 0, 3, 18, 6, 1, 0, 4, 75, 90, 10, 1, 0, 5, 260, 804, 346, 15, 1, 0, 6, 805, 5444, 5988, 1146, 21, 1, 0, 7, 2310, 31180, 70980, 36363, 3450, 28, 1, 0, 8, 6279, 159774, 671180, 710980, 193827, 9722, 36, 1, 0, 9, 16392, 756420, 5468190, 10436805, 6019396, 943968, 26106, 45, 1
Offset: 0

Views

Author

Seiichi Manyama, Dec 26 2023

Keywords

Examples

			Square array begins:
  1,  0,    0,     0,      0,        0, ...
  1,  1,    2,     3,      4,        5, ...
  1,  3,   18,    75,    260,      805, ...
  1,  6,   90,   804,   5444,    31180, ...
  1, 10,  346,  5988,  70980,   671180, ...
  1, 15, 1146, 36363, 710980, 10436805, ...
		

Crossrefs

Columns k=0..3 give A000012, A000217, A036800, A343808.
Main diagonal gives A303991.

Programs

  • PARI
    T(n, k) = sum(j=0, n, k^j*j^k);

Formula

G.f. of column k: k*x*A_k(k*x)/((1-x) * (1-k*x)^(k+1)), where A_n(x) are the Eulerian polynomials for k > 0.
Showing 1-10 of 11 results. Next