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.

Previous Showing 11-13 of 13 results.

A358994 The sum of the numbers that are inside the contour of an n-story Christmas tree drawn at the top of the numerical pyramid containing the positive integers in natural order.

Original entry on oeis.org

21, 151, 561, 1503, 3310, 6396, 11256, 18466, 28683, 42645, 61171, 85161, 115596, 153538, 200130, 256596, 324241, 404451, 498693, 608515, 735546, 881496, 1048156, 1237398, 1451175, 1691521, 1960551, 2260461, 2593528, 2962110, 3368646, 3815656, 4305741, 4841583, 5425945
Offset: 1

Views

Author

Nicolay Avilov, Dec 25 2022

Keywords

Comments

The numbers of the natural series are written line by line in the form of a numerical pyramid: the first line contains the number 1, the second line contains the next two numbers 2 and 3, the third line contains the next three numbers 4, 5 and 6, etc.; that is, the line starting with the number k contains the k following numbers. In this numerical pyramid, the contour of a "multi-story Christmas tree" is distinguished, each floor of which occupies three lines. The numbers of the sequence are the sum of all the numbers that fall into the contour of the Christmas tree, which has n floors.

Examples

			a(1) = 1 + 2 + 3 + 4 + 5 + 6 = 21;
a(2) = a(1) + (8 + 9 + 12 + 13 + 14 + 17 +18 + 19 + 20) = 151.
		

Crossrefs

Programs

  • Magma
    [n*(27*n^3 + 66*n^2 + 49*n + 26)/8 : n in [1..60]]; // Wesley Ivan Hurt, Jun 14 2025
  • Python
    def a(n): return n*(27*n**3 + 66*n**2 + 49*n + 26) // 8
    print([a(n) for n in range(1, 36)]) # Michael S. Branicky, Dec 25 2022
    

Formula

a(n) = n*(27*n^3 + 66*n^2 + 49*n + 26) / 8.
G.f.: x*(21 + 46*x + 16*x^2 - 2*x^3)/(1 - x)^5. - Stefano Spezia, Dec 25 2022
a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). - Wesley Ivan Hurt, Jun 14 2025

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

A207327 Riordan array (1, x*(1+x)^2/(1-x)).

Original entry on oeis.org

1, 0, 1, 0, 3, 1, 0, 4, 6, 1, 0, 4, 17, 9, 1, 0, 4, 32, 39, 12, 1, 0, 4, 48, 111, 70, 15, 1, 0, 4, 64, 240, 268, 110, 18, 1, 0, 4, 80, 432, 769, 530, 159, 21, 1, 0, 4, 96, 688, 1792, 1905, 924, 217, 24, 1, 0, 4
Offset: 0

Views

Author

Philippe Deléham, Feb 17 2012

Keywords

Comments

Triangle T(n,k), read by rows, given by (0, 3, -5/3, 4/15, -3/5, 0, 0, 0, 0, 0, 0, 0, ...) DELTA (1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...) where DELTA is the operator defined in A084938.
Row sums are A077995(n).

Examples

			Triangle begins :
1
0, 1
0, 3, 1
0, 4, 6, 1
0, 4, 17, 9, 1
0, 4, 32, 39, 12, 1
0, 4, 48, 111, 70, 15, 1
0, 4, 64, 240, 268, 110, 18, 1
0, 4, 80, 432, 769, 530, 159, 21, 1
0, 4, 96, 688, 1792, 1905, 924, 217, 24, 1
0, 4, 112, 1008, 3584, 5503, 3999, 1477, 284, 27, 1
0, 4, 128, 1392, 6400, 13440, 13842, 7483, 2216, 360, 30, 1
		

Crossrefs

Cf. Diagonals : A000012, A008585, A022266, A000007, A113311

Formula

T(2*n,n) = A119259(n).
G.f.: (1-x)/(1-(1+y)*x-2*y*x^2-y*x^3).
T(n,k) = T(n-1,k) + T(n-1,k-1) + 2*T(n-2,k-1) + T(n-3,k-1), T(0,0) = 1, T(1,0) = 0.
Previous Showing 11-13 of 13 results.