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.

A060354 The n-th n-gonal number: a(n) = n*(n^2 - 3*n + 4)/2.

Original entry on oeis.org

0, 1, 2, 6, 16, 35, 66, 112, 176, 261, 370, 506, 672, 871, 1106, 1380, 1696, 2057, 2466, 2926, 3440, 4011, 4642, 5336, 6096, 6925, 7826, 8802, 9856, 10991, 12210, 13516, 14912, 16401, 17986, 19670, 21456, 23347, 25346, 27456, 29680, 32021
Offset: 0

Views

Author

Hareendra Yalamanchili (hyalaman(AT)mit.edu), Apr 01 2001

Keywords

Comments

Binomial transform of (0,1,0,3,0,0,0,...). - Paul Barry, Sep 14 2006
Also the number of permutations of length n which can be sorted by a single cut-and-paste move (in the sense of Cranston, Sudborough, and West). - Vincent Vatter, Aug 21 2013
Main diagonal of A317302. - Omar E. Pol, Aug 11 2018
a(n) is the number of ternary strings of length n that contain exactly one 1, zero or two 2's and have no restriction on the number of 0's. For example, a(5) = 35 since the strings are 12200 (30 of this type) and 10000 (5 of this type). - Enrique Navarrete, May 08 2025

Crossrefs

First differences of A004255.

Programs

  • Magma
    [(n*(n-2)^2+n^2)/2: n in [0..50]]; // Vincenzo Librandi, Feb 16 2015
  • Maple
    A060354 := proc(n)
        (n*(n-2)^2+n^2)/2 ;
    end proc: # R. J. Mathar, Jul 28 2016
  • Mathematica
    Table[(n (n-2)^2+n^2)/2,{n,0,50}] (* Harvey P. Dale, Aug 05 2011 *)
    CoefficientList[Series[x (1 - 2 x + 4 x^2) / (1 - x)^4, {x, 0, 50}], x] (* Vincenzo Librandi, Feb 16 2015 *)
    Table[PolygonalNumber[n,n],{n,0,50}] (* Harvey P. Dale, Mar 07 2016 *)
    LinearRecurrence[{4,-6,4,-1},{0,1,2,6},50] (* Harvey P. Dale, Mar 07 2016 *)
  • PARI
    a(n) = { (n*(n - 2)^2 + n^2)/2 } \\ Harry J. Smith, Jul 04 2009
    

Formula

a(n) = (n*(n-2)^2 + n^2)/2.
E.g.f.: exp(x)*x*(1+x^2/2). - Paul Barry, Sep 14 2006
G.f.: x*(1-2*x+4*x^2)/(1-x)^4. - R. J. Mathar, Sep 02 2008
a(n) = A057145(n,n). - R. J. Mathar, Jul 28 2016
a(n) = A000124(n-2) * n. - Bruce J. Nicholson, Jul 13 2018
a(n) = Sum_{i=0..n-1} (i*(n-2) + 1). - Ivan N. Ianakiev, Sep 25 2020

A062026 a(n) = n*(n+1)*(n^2 - 3*n + 6)/4.

Original entry on oeis.org

0, 2, 6, 18, 50, 120, 252, 476, 828, 1350, 2090, 3102, 4446, 6188, 8400, 11160, 14552, 18666, 23598, 29450, 36330, 44352, 53636, 64308, 76500, 90350, 106002, 123606, 143318, 165300, 189720, 216752, 246576, 279378, 315350, 354690, 397602, 444296
Offset: 0

Views

Author

Amarnath Murthy, Jun 02 2001

Keywords

Comments

a(n) = 1*2*3 + 2*3*4 + 3*4*5 +. . .+ (n-2)*(n-1)*n +(n-1)*n*1+ n*1*2, the sum of the cyclic product of terms taken three at a time, final term being n*1*2=2n.

Examples

			a(4) = 1*2*3 + 2*3*4 + 3*4*1 + 4*1*2 = 50.
		

Crossrefs

Cf. A004255.

Programs

  • Mathematica
    Table[n(n+1)(n^2-3n+6)/4,{n,0,40}] (* or *) LinearRecurrence[{5,-10,10,-5,1},{0,2,6,18,50},40] (* Harvey P. Dale, Apr 22 2015 *)
  • PARI
    a(n) = n*(n+1)*(n^2 -3*n +6)/4 \\ Harry J. Smith, Jul 29 2009
    
  • SageMath
    [n*(n+1)*(n^2-3*n+6)/4 for n in (0..40)] # G. C. Greubel, May 05 2022

Formula

a(n) = 2 * A004255(n).
a(0)=0, a(1)=2, a(2)=6, a(3)=18, a(4)=50, a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). - Harvey P. Dale, Apr 22 2015
From G. C. Greubel, May 05 2022: (Start)
a(n) = 6*binomial(n+3, 4) - 12*binomial(n+2, 3) + 8*binomial(n+1, 2).
G.f.: 2*x*(1 - 2*x + 4*x^2)/(1-x)^5.
E.g.f.: (1/4)*x*(8 + 4*x + 4*x^2 + x^3)*exp(x). (End)

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 06 2001

A101357 Partial sums of A060354.

Original entry on oeis.org

0, 1, 3, 9, 25, 60, 126, 238, 414, 675, 1045, 1551, 2223, 3094, 4200, 5580, 7276, 9333, 11799, 14725, 18165, 22176, 26818, 32154, 38250, 45175, 53001, 61803, 71659, 82650, 94860, 108376, 123288, 139689, 157675, 177345, 198801, 222148, 247494
Offset: 0

Views

Author

Jonathan Vos Post, Dec 25 2004

Keywords

Comments

The Ca4 triangle sums of A139600 are given by the terms of this sequence. For the definitions of the Ca4 and other triangle sums see A180662. - Johannes W. Meijer, Apr 29 2011

Crossrefs

Programs

  • Magma
    [(n^4-2*n^3+3*n^2+6*n)/8: n in [0..40]]; // Vincenzo Librandi, Aug 06 2011
    
  • Mathematica
    Table[Sum[(i*(i - 2)^2 + i^2)/2, {i, 0, n}], {n, 0, 38}]
    Accumulate[Table[(n (n-2)^2+n^2)/2,{n,0,50}]] (* Harvey P. Dale, Aug 05 2011 *)
  • PARI
    a(n)=(n^4-2*n^3+3*n^2+6*n)/8 \\ Charles R Greathouse IV, Oct 16 2015

Formula

a(n) = Sum_{i=0..n} (i(i-2)^2 + i^2)/2.
a(n) = A004255(n), n > 0. - R. J. Mathar, Sep 02 2008
a(n) = binomial(n+3,4) - 2*binomial(n+2,4) + 4*binomial(n+1,4).
a(n) = (n^4 - 2*n^3 + 3*n^2 + 6*n)/8. - Johannes W. Meijer, Apr 29 2011
G.f.: -x*(4*x^2 - 2*x + 1) / (x-1)^5. - Colin Barker, Apr 29 2013

Extensions

More terms from Joshua Zucker, May 12 2006
Edited by Stefan Steinerberger, Aug 01 2007

A341703 a(n) = 6*binomial(n,4) + 2*binomial(n,2) + 1.

Original entry on oeis.org

1, 1, 3, 7, 19, 51, 121, 253, 477, 829, 1351, 2091, 3103, 4447, 6189, 8401, 11161, 14553, 18667, 23599, 29451, 36331, 44353, 53637, 64309, 76501, 90351, 106003, 123607, 143319, 165301, 189721, 216753, 246577, 279379, 315351, 354691, 397603, 444297, 494989, 549901
Offset: 0

Views

Author

Enrique Navarrete, Feb 17 2021

Keywords

Comments

a(n) is the number of ternary strings of length n that contain either none or two 0's and either none or two 1's.

Examples

			a(6)=121 since the strings are the 90 permutations of 110022, the 15 permutations of 002222, the 15 permutations of 112222, and 222222.
		

Crossrefs

Formula

E.g.f.: exp(x)*(1 + x^2/2)^2.
From Stefano Spezia, Feb 19 2021: (Start)
O.g.f.:(1 - 4*x + 8*x^2 - 8*x^3 + 9*x^4)/(1 - x)^5.
a(n) = (4 - 10*n + 15*n^2 - 6*n^3 + n^4)/4. (End)
a(n) = 2*A004255(n-1) + 1. - Hugo Pfoertner, Feb 19 2021
Showing 1-4 of 4 results.