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

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

Original entry on oeis.org

2, 1, 0, 5, 26, 77, 176, 345, 610, 1001, 1552, 2301, 3290, 4565, 6176, 8177, 10626, 13585, 17120, 21301, 26202, 31901, 38480, 46025, 54626, 64377, 75376, 87725, 101530, 116901, 133952, 152801, 173570, 196385, 221376, 248677, 278426, 310765, 345840, 383801, 424802, 469001
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Feb 04 2018

Keywords

Examples

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

Crossrefs

Programs

  • GAP
    List([1..50], n -> n^4/6-2*n^3/3-n^2/6+5*n/3+1); # Muniru A Asiru, Feb 04 2018
    
  • Julia
    [div((n-3)*(n+1)*(n^2-2*n-2),6) for n in 1:50] |> println # Bruno Berselli, Apr 11 2018
  • Magma
    [n^4/6-2*n^3/3-n^2/6+5*n/3+1: n in [1..50]];
    
  • Maple
    seq(n^4/6-2*n^3/3-n^2/6+5*n/3+1,n=1..50); # Muniru A Asiru, Feb 04 2018
  • Mathematica
    f[n_] := n^4/6 - 2 n^3/3 - n^2/6 + 5 n/3 + 1; Array[f, 50] (* or *)
    CoefficientList[ Series[(-2 + 9 x - 15 x^2 + 5 x^3 - x^4)/(-1 + x)^5, {x, 0, 50}], x] (* or *)
    LinearRecurrence[{5, -10, 10, -5, 1}, {2, 1, 0, 5, 26}, 50] (* Robert G. Wilson v, Feb 09 2018 *)
  • PARI
    Vec(x*(2 - 9*x + 15*x^2 - 5*x^3 + x^4) / (1 - x)^5 + O(x^50)) \\ Colin Barker, Feb 05 2018
    

Formula

a(n) = (n - 3)*(n + 1)*(n^2 - 2*n - 2)/6 = A299120(n-1) + A299120(1-n).
From Colin Barker, Feb 05 2018: (Start)
G.f.: x*(2 - 9*x + 15*x^2 - 5*x^3 + x^4) / (1 - x)^5.
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5) for n>5.
(End)
E.g.f.: exp(x)*(6 + 6*x - 6*x^2 + 2*x^3 + x^4)/6. - Iain Fox, Feb 09 2018
6*a(n) = A067998(n)^2 - 5*A067998(n) + 6. - Bruno Berselli, Apr 11 2018

A361226 Square array T(n,k) = k*((1+2*n)*k - 1)/2; n>=0, k>=0, read by antidiagonals upwards.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 0, 2, 5, 3, 0, 3, 9, 12, 6, 0, 4, 13, 21, 22, 10, 0, 5, 17, 30, 38, 35, 15, 0, 6, 21, 39, 54, 60, 51, 21, 0, 7, 25, 48, 70, 85, 87, 70, 28, 0, 8, 29, 57, 86, 110, 123, 119, 92, 36, 0, 9, 33, 66, 102, 135, 159, 168, 156, 117, 45
Offset: 0

Views

Author

Paul Curtz, Mar 05 2023

Keywords

Comments

The main diagonal is A002414.
The first upper diagonal is A160378(n+1).
The antidiagonals sums are A034827(n+2).
b(n) = (A034827(n+3) = 0, 2, 10, 30, 70, ...) - (A002414(n) = 0, 1, 9, 30, 70, ...) = 0, 1, 1, 0, 0, 5, 21, 56, ... .
b(n+2) = A299120(n). b(n+4) = A033275(n). b(n+4) - b(n) = A002492(n).

Examples

			The rows are
  0, 0,  1,  3,  6,  10,  15,  21, ...   = A161680
  0, 1,  5, 12, 22,  35,  51,  70, ...   = A000326
  0, 2,  9, 21, 38,  60,  87, 119, ...   = A005476
  0, 3, 13, 30, 54,  85, 123, 168, ...   = A022264
  0, 4, 17, 39, 70, 110, 159, 217, ...   = A022266
  ... .
Columns: A000004, A001477, A016813, A017197=3*A016777, 2*A017101, 5*A016873, 3*A017581, 7*A017017, ... (coefficients from A026741).
Difference between two consecutive rows: A000290. Hence A143844.
This square array read by antidiagonals leads to the triangle
  0
  0   0
  0   1   1
  0   2   5   3
  0   3   9  12   6
  0   4  13  21  22  10
  0   5  17  30  38  35  15
  ... .
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_] := k*((2*n + 1)*k - 1)/2; Table[T[n - k, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Amiram Eldar, Mar 05 2023 *)
  • PARI
    a(n) = { my(row = (sqrtint(8*n+1)-1)\2, column = n - binomial(row + 1, 2)); binomial(column, 2) + column^2 * (row - column) } \\ David A. Corneth, Mar 05 2023
    
  • Python
    # Seen as a triangle:
    from functools import cache
    @cache
    def Trow(n: int) -> list[int]:
        if n == 0: return [0]
        r = Trow(n - 1)
        return [r[k] + k * k if k < n else r[n - 1] + n - 1 for k in range(n + 1)]
    for n in range(7): print(Trow(n)) # Peter Luschny, Mar 05 2023

Formula

Take successively sequences n*(n-1)/2, n*(3*n-1)/2, n*(5*n-1)/2, ... listed in the EXAMPLE section.
G.f.: y*(x + y)/((1 - y)^3*(1 - x)^2). - Stefano Spezia, Mar 06 2023
E.g.f.: exp(x+y)*y*(2*x + y + 2*x*y)/2. - Stefano Spezia, Feb 21 2024
Showing 1-2 of 2 results.