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-3 of 3 results.

A081489 a(n) = n*(2*n^2 -3*n +7)/6 = C(n, 1) + C(n, 2) + 2*C(n, 3).

Original entry on oeis.org

1, 3, 8, 18, 35, 61, 98, 148, 213, 295, 396, 518, 663, 833, 1030, 1256, 1513, 1803, 2128, 2490, 2891, 3333, 3818, 4348, 4925, 5551, 6228, 6958, 7743, 8585, 9486, 10448, 11473, 12563, 13720, 14946, 16243, 17613, 19058, 20580, 22181, 23863, 25628
Offset: 1

Views

Author

Amarnath Murthy, Mar 25 2003

Keywords

Comments

Diagonal of triangle in A081491.
First difference is given by A002522 = n^2 + 1. Second difference is odd numbers given by A005408.
With offset 0, this is the binomial transform of (0,1,1,2,0,0,0,...). - Paul Barry, Jul 03 2003
Equals row sums of triangle A144337. - Gary W. Adamson, Sep 18 2008
a(n) = sum of first (n-1) squares + n; e.g., a(5) = 35 = (1 + 4 + 9 + 16 + 5). - Gary W. Adamson, Aug 27 2010
Equals the number of functions from {1,2,...,n} to {1,2,...,n} that occur as compositions of U(x) = min{x+1,n} and D(x) = max{x-1,1}, including the identity function (the empty composition). Problem 11901 in The American Mathematical Monthly, volume 123, page 399, April 2016), proposed by Don Knuth, asked for the count of such functions (solution submitted to Monthly by Jerrold W. Grossman and Serge Kruk, August 21, 2016). - Jerrold Grossman, Aug 21 2016

Crossrefs

Programs

  • GAP
    List([1..50], n-> n*(2*n^2-3*n+7)/6); # G. C. Greubel, Aug 13 2019
    
  • Magma
    I:=[1,3,8,18]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..50]]; // Vincenzo Librandi, Feb 28 2014
    
  • Maple
    with(combinat):a:=n->sum(fibonacci(3,i), i=0..n): seq(a(n), n=0..42); # Zerinvary Lajos, Mar 20 2008
  • Mathematica
    Table[n*(2*n^2-3*n+7)/6, {n,50}] (* Vladimir Joseph Stephan Orlovsky, Nov 07 2008, modified by G. C. Greubel, Aug 13 2019 *)
    LinearRecurrence[{4,-6,4,-1},{1,3,8,18},50] (* Harvey P. Dale, Aug 07 2025 *)
  • PARI
    my(x='x+O(x^50)); Vec(serlaplace(exp(x)*(x+x^2/2+x^3/3)))
    
  • Python
    def A081489(n): return n*(n*((n<<1)-3)+7)//6 # Chai Wah Wu, Nov 05 2024
  • Sage
    [n*(2*n^2-3*n+7)/6 for n in (1..50)] # G. C. Greubel, Aug 13 2019
    

Formula

a(n) = n*(2*n^2 -3*n +7)/6 = C(n, 1) + C(n, 2) + 2*C(n, 3). - Paul Barry, Jul 03 2003
E.g.f.: exp(x)*(x +x^2/2 +x^3/3).
O.g.f.: x*(1-x+2*x^2)/(1-x)^4. - Colin Barker, Jul 28 2012
a(n) = 2*n + Sum_{i=1..n} (i^2 - 2*i). - Wesley Ivan Hurt, Feb 25 2014

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 29 2003
New name, using the formulas of Paul Barry, Joerg Arndt, Feb 28 2014

A081491 Triangle read by rows in which the n-th row contains n terms of an arithmetic progression with a common difference of (n-1) and the first term of (n+1)-th row is 1 more than the last term of the n-th row.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 12, 15, 18, 19, 23, 27, 31, 35, 36, 41, 46, 51, 56, 61, 62, 68, 74, 80, 86, 92, 98, 99, 106, 113, 120, 127, 134, 141, 148, 149, 157, 165, 173, 181, 189, 197, 205, 213, 214, 223, 232, 241, 250, 259, 268, 277, 286, 295, 296, 306, 316, 326, 336, 346
Offset: 1

Views

Author

Amarnath Murthy, Mar 25 2003

Keywords

Examples

			1; 2,3; 4,6,8; 9,12,15,18; 19,23,27,31,35; 36,41,46,51,56,61; ...
		

Crossrefs

Programs

  • Mathematica
    Table[NestList[#+n-1&,(2n^3-9n^2+19n-6)/6,n-1],{n,11}]//Flatten (* Harvey P. Dale, Feb 12 2024 *)

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 29 2003

A081492 Sum of terms in n-th row of A081491.

Original entry on oeis.org

1, 5, 18, 54, 135, 291, 560, 988, 1629, 2545, 3806, 5490, 7683, 10479, 13980, 18296, 23545, 29853, 37354, 46190, 56511, 68475, 82248, 98004, 115925, 136201, 159030, 184618, 213179, 244935, 280116, 318960, 361713, 408629, 459970, 516006, 577015
Offset: 1

Views

Author

Amarnath Murthy, Mar 25 2003

Keywords

Comments

For odd n a(n) is a multiple of n and a(n)/n is the middle term of the corresponding row.

Crossrefs

Programs

  • GAP
    List([1..40], n-> n*(2*(n-1)^3+7*n-1)/6); # G. C. Greubel, Aug 13 2019
  • Magma
    [n*(2*(n-1)^3+7*n-1)/6: n in [1..40]]; // G. C. Greubel, Aug 13 2019
    
  • Maple
    seq(n*(2*(n-1)^3+7*n-1)/6, n=1..40); # G. C. Greubel, Aug 13 2019
  • Mathematica
    LinearRecurrence[{5,-10,10,-5,1},{1,5,18,54,135},40] (* Harvey P. Dale, Jul 01 2018 *)
  • PARI
    vector(40, n, n*(2*(n-1)^3+7*n-1)/6) \\ G. C. Greubel, Aug 13 2019
    
  • Sage
    [n*(2*(n-1)^3+7*n-1)/6 for n in (1..40)] # G. C. Greubel, Aug 13 2019
    

Formula

a(n) = n*(2*n^3 - 6*n^2 + 13*n - 3)/6.
G.f.: x*(1+x)*(1-x+4*x^2)/(1-x)^5. - Colin Barker, Jul 28 2012
E.g.f.: x*(6 +9*x +6*x^2 +2*x^3)/6. - G. C. Greubel, Aug 13 2019

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 29 2003.
Formula corrected by Colin Barker, Jul 28 2012
Showing 1-3 of 3 results.