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 49 results. Next

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

A059268 Concatenate subsequences [2^0, 2^1, ..., 2^n] for n = 0, 1, 2, ...

Original entry on oeis.org

1, 1, 2, 1, 2, 4, 1, 2, 4, 8, 1, 2, 4, 8, 16, 1, 2, 4, 8, 16, 32, 1, 2, 4, 8, 16, 32, 64, 1, 2, 4, 8, 16, 32, 64, 128, 1, 2, 4, 8, 16, 32, 64, 128, 256, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048
Offset: 0

Views

Author

N. J. A. Sloane, Jan 23 2001

Keywords

Comments

Triangular array T(n,k) read by rows, where T(n,k) = i!*j! times coefficient of x^n*y^k in exp(x+2y).
T(n,k) is the number of subsets of {0,1,...,n} whose largest element is k. To see this, let A be any subset of the 2^k subsets of {0,1,...,k-1}. Then there are 2^k subsets of the form (A U {k}). See example below. - Dennis P. Walsh, Nov 27 2011
Sequence B is called a reluctant sequence of sequence A, if B is triangle array read by rows: row number k coincides with first k elements. A059268 is reluctant sequence of sequence A000079. - Boris Putievskiy, Dec 17 2012

Examples

			T(4,3)=8 since there are 8 subsets of {0,1,2,3,4} whose largest element is 3, namely, {3}, {0,3}, {1,3}, {2,3}, {0,1,3}, {0,2,3}, {1,2,3}, and {0,1,2,3}.
Triangle starts:
  1;
  1, 2;
  1, 2, 4;
  1, 2, 4, 8;
  1, 2, 4, 8, 16;
  1, 2, 4, 8, 16, 32;
  ...
		

Crossrefs

Cf. A140531.
Cf. A000079.
Cf. A131816.
Row sums give A126646.

Programs

  • Haskell
    a059268 n k = a059268_tabl !! n !! k
    a059268_row n = a059268_tabl !! n
    a059268_tabl = iterate (scanl (+) 1) [1]
    -- Reinhard Zumkeller, Apr 18 2013, Jul 05 2012
    
  • Maple
    seq(seq(2^k,k=0..n),n=0..10);
  • Mathematica
    Table[2^k, {n, 0, 11}, {k, 0, n}] // Flatten (* Jean-François Alcover, Jun 10 2013 *)
  • Python
    from math import isqrt
    def A059268(n):
        a = (m:=isqrt(k:=n+1<<1))-(k<=m*(m+1))
        return 1<>1) # Chai Wah Wu, Feb 24 2025

Formula

E.g.f.: exp(x+2*y) (T coordinates).
a(n) = A018900(n+1) - A140513(n). - Reinhard Zumkeller, Jun 24 2009
T(n,k) = A173786(n-1,k-1) - A173787(n-1,k-1), 0Reinhard Zumkeller, Feb 28 2010
T(n,k) = 2^k. - Reinhard Zumkeller, Jan 29 2010
As a linear array, the sequence is a(n) = 2^(n-1-t*(t+1)/2), where t = floor((-1+sqrt(8*n-7))/2), n>=1. - Boris Putievskiy, Dec 17 2012
As a linear array, the sequence is a(n) = 2^(n-1-t*(t+1)/2), where t = floor(sqrt(2*n)-1/2), n>=1. - Zhining Yang, Jun 09 2017

Extensions

Formula corrected by Reinhard Zumkeller, Feb 23 2010

A086224 a(n) = 7*2^n - 1.

Original entry on oeis.org

6, 13, 27, 55, 111, 223, 447, 895, 1791, 3583, 7167, 14335, 28671, 57343, 114687, 229375, 458751, 917503, 1835007, 3670015, 7340031, 14680063, 29360127, 58720255, 117440511, 234881023, 469762047, 939524095, 1879048191, 3758096383, 7516192767, 15032385535, 30064771071
Offset: 0

Views

Author

Marco Matosic, Jul 27 2003

Keywords

Comments

a(n) = A164874(n+2,2); subsequence of A030130. - Reinhard Zumkeller, Aug 29 2009
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)=(-1)^n*charpoly(A,-5). - Milan Janjic, Jan 27 2010

Crossrefs

Other sequences with recurrence a(n+1) = 2*a(n) + 1 are:
a(0) = 2 gives A153893, a(0)=3 essentially A126646.
a(0) = 4 gives A153894, a(0)=5 essentially A153893.
a(0) = 7 gives essentially A000225.
a(0) = 8 gives A052996 except for some initial terms,
a(0) = 9 is essentially A153894.
a(0) = 10 gives A086225,
a(0) = 11 is essentially A153893.
a(0) = 13 is essentially A086224.

Programs

  • Mathematica
    7*2^Range[0,30]-1 (* Harvey P. Dale, May 09 2018 *)
  • PARI
    a(n)=7<Charles R Greathouse IV, Sep 24 2015

Formula

a(n+1) = 2*a(n) + 1.
G.f.: (6-5*x)/((1-x)*(1-2*x)). - Jaume Oliver Lafont, Sep 14 2009
a(n-1)^2 + a(n) = (7*2^(n-1))^2. - Vincenzo Librandi, Aug 08 2010
a(n) = (A052940(n+1) + A000225(n+3))/2. - Gennady Eremin, Aug 31 2023
From Elmo R. Oliveira, Apr 22 2025: (Start)
E.g.f.: exp(x)*(7*exp(x) - 1).
a(n) = 3*a(n-1) - 2*a(n-2). (End)

Extensions

More terms from David Wasserman, Feb 22 2005

A098410 Expansion of 1/(sqrt(1-4*x)*sqrt(1-8*x)).

Original entry on oeis.org

1, 6, 38, 252, 1734, 12276, 88796, 652728, 4856902, 36478404, 275975028, 2099978568, 16054486044, 123213933576, 948713646072, 7325088811632, 56692748053062, 439689331938276, 3416328042565124, 26587566855421608, 207218159714453044, 1617124976299315224, 12634892752595949192
Offset: 0

Views

Author

Paul Barry, Sep 07 2004

Keywords

Comments

Convolution of A000984(n) and 2^n*A000984(n). Convolution of A000984(n) and A059304. 4th binomial transform of A000984.
Largest coefficient of (1 + 6*x + x^2)^n. - Philippe Deléham, Oct 02 2007
Also number of paths from (0,0) to (n,0) using steps U=(1,1), H=(1,0) and D=(1,-1), the H steps can have 6 colors. - N-E. Fahssi, Mar 31 2008
Self-convolution of a(n)/4^n gives A126646. - Vladimir Reshetnikov, Oct 10 2016
Diagonal of rational function 1/(1 - (x^2 + 6*x*y + y^2)). - Gheorghe Coserea, Aug 03 2018

Examples

			G.f. = 1 + 6*x + 38*x^2 + 252*x^3 + 1734*x^4 + 12276*x^5 + 88796*x^6 + ...
		

Crossrefs

Column 6 of A292627. Cf. A025230, A104454 (binomial transf.)

Programs

  • Mathematica
    Table[SeriesCoefficient[1/(Sqrt[1-4*x]*Sqrt[1-8*x]),{x,0,n}],{n,0,20}] (* Vaclav Kotesovec, Oct 15 2012 *)
    a[ n_] := If[n < 0, 0, 4^n Hypergeometric2F1[-n, 1/2, 1, -1]]; (* Michael Somos, May 06 2017 *)
    a[ n_] := SeriesCoefficient[ D[ InverseJacobiSD[2 x, -1] / 2, x], {x, 0, 2 n}]; (* Michael Somos, May 06 2017 *)
  • PARI
    x='x+O('x^66); Vec(1/sqrt(1-12*x+32*x^2)) \\ Joerg Arndt, May 11 2013
    
  • PARI
    {a(n) = sum(k=0, n, 8^(n-k)*(-1)^k*binomial(n, k)*binomial(2*k, k))} \\ Seiichi Manyama, Apr 22 2019
    
  • PARI
    {a(n) = sum(k=0, n\2, 6^(n-2*k)*binomial(n, 2*k)*binomial(2*k, k))} \\ Seiichi Manyama, May 04 2019
    
  • Sage
    a = lambda n: 4^n*hypergeometric([-n, 1/2], [1], -1)
    [simplify(a(n)) for n in range(23)] # Peter Luschny, May 19 2015

Formula

G.f.: 1/sqrt(1 - 12*x + 32*x^2).
E.g.f.: exp(6*x)*BesselI(0, 2*x).
a(n) = Sum_{k=0..n} 2^k*binomial(2*k, k)*binomial(2*(n-k), n-k).
a(n) = Sum_{k=0..n} 4^(n-k)*binomial(n,k)*binomial(2k,k). - Paul Barry, Mar 08 2005
D-finite with recurrence: n*a(n) = 6*(2*n-1)*a(n-1) - 32*(n-1)*a(n-2). - Vaclav Kotesovec, Oct 15 2012
a(n) ~ 2^(3*n+1/2)/sqrt(Pi*n). - Vaclav Kotesovec, Oct 15 2012
a(n) = 4^n*hypergeometric([-n, 1/2], [1], -1). - Peter Luschny, May 19 2015
a(n) = Sum_{k=0..n} 8^(n-k) * (-1)^k * binomial(n,k) * binomial(2*k,k). - Seiichi Manyama, Apr 22 2019
a(n) = Sum_{k=0..floor(n/2)} 6^(n-2*k) * binomial(n,2*k) * binomial(2*k,k). - Seiichi Manyama, May 04 2019
From Peter Bala, Jan 10 2022: (Start)
3*x + x^2*exp(Sum_{n >= 1} a(n)*x^n/n) = 3*x + x^2 + 6*x^3 + 37*x^4 + 234*x^5 + 1514*x^6 + ... is the o.g.f. of A025230.
The Gauss congruences a(n*p^k) == a(n*p^(k-1)) (mod p^k) hold for prime p and positive integers n and k.
a(n) = (1/Pi) * Integral_{x = -1..1} (4 + 4*x^2)^n/sqrt(1 - x^2) dx = (1/Pi) * Integral_{x = -1..1} (8 - 4*x^2)^n/sqrt(1 - x^2) dx. (End)

A261461 a(n) is the smallest nonzero number that is not a substring of n in its binary representation.

Original entry on oeis.org

1, 2, 3, 2, 3, 3, 4, 2, 3, 3, 3, 4, 5, 4, 4, 2, 3, 3, 3, 5, 3, 3, 4, 4, 5, 5, 4, 4, 5, 4, 4, 2, 3, 3, 3, 5, 3, 3, 5, 5, 3, 3, 3, 4, 7, 4, 4, 4, 5, 5, 5, 5, 7, 4, 4, 4, 5, 5, 4, 4, 5, 4, 4, 2, 3, 3, 3, 5, 3, 3, 5, 5, 3, 3, 3, 6, 5, 7, 5, 5, 3, 3, 3, 6, 3, 3
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 30 2015

Keywords

Comments

A261018(n) = a(A260273(n)).
Is a(n) = A091460(n) for n>1? - R. J. Mathar, Sep 02 2015. The lowest counterexample occurs at a(121) = 5 < 6 = A091460(121). - Álvar Ibeas, Sep 08 2020
a(A062289(n))=A261922(A062289(n)); a(A126646(n))!=A261922(A126646(n)). - Reinhard Zumkeller, Sep 17 2015

Crossrefs

Cf. A007088, A030308, A260273, A261018; record values and where they occur: A261466, A261467.
See A261922 for a variant.

Programs

  • Haskell
    import Data.List (isInfixOf)
    a261461 x = f $ tail a030308_tabf where
       f (cs:css) = if isInfixOf cs (a030308_row x)
                       then f css else foldr (\d v -> 2 * v + d) 0 cs
    
  • Mathematica
    fQ[m_, n_] := Block[{g}, g[x_] := ToString@ FromDigits@ IntegerDigits[x, 2]; StringContainsQ[g@ n, g@ m]]; Table[k = 1; While[fQ[k, n] && k < n, k++]; k, {n, 85}] (* Michael De Vlieger, Sep 21 2015 *)
  • Python
    from itertools import count
    def a(n):
        b, k = bin(n)[2:], 1
        return next(k for k in count(1) if bin(k)[2:] not in b)
    print([a(n) for n in range(86)]) # Michael S. Branicky, Feb 26 2023

Formula

a(n) = A144016(n) + 1 for any n > 0. - Rémy Sigrist, Mar 10 2018

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

A168604 a(n) = 2^(n-2) - 1.

Original entry on oeis.org

1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215, 33554431, 67108863, 134217727, 268435455, 536870911, 1073741823, 2147483647, 4294967295, 8589934591
Offset: 3

Views

Author

Martin Griffiths, Dec 01 2009

Keywords

Comments

Number of ways of partitioning the multiset {1,1,1,2,3,...,n-2} into exactly two nonempty parts.
An elephant sequence, see A175655. For the central square six A[5] vectors, with decimal values between 26 and 176, lead to this sequence. For the corner squares these vectors lead to the companion sequence A000325 (without the first leading 1). - Johannes W. Meijer, Aug 15 2010

Examples

			The partitions of {1,1,1,2,3} into exactly two nonempty parts are {{1},{1,1,2,3}}, {{2},{1,1,1,3}}, {{3},{1,1,1,2}}, {{1,1},{1,2,3}}, {{1,2},{1,1,3}}, {{1,3},{1,1,2}} and {{2,3},{1,1,1}}.
		

Crossrefs

The number of ways of partitioning the multiset {1, 1, 1, 2, 3, ..., n-1} into exactly three and four nonempty parts are given in A168605 and A168606, respectively.

Programs

Formula

E.g.f.: 2*exp(2*x)-exp(x).
a(n) = A000225(n-2).
G.f.: x^3/((1-x)*(1-2*x))
a(n) = A126646(n-3). - R. J. Mathar, Dec 11 2009
a(n) = 3*a(n-1) - 2*a(n-2). - Arkadiusz Wesolowski, Jun 14 2013
a(n) = A000918(n-2) + 1. - Miquel Cerda, Aug 09 2016

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
Showing 1-10 of 49 results. Next