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.

A083487 Triangle read by rows: T(n,k) = 2*n*k + n + k (1 <= k <= n).

Original entry on oeis.org

4, 7, 12, 10, 17, 24, 13, 22, 31, 40, 16, 27, 38, 49, 60, 19, 32, 45, 58, 71, 84, 22, 37, 52, 67, 82, 97, 112, 25, 42, 59, 76, 93, 110, 127, 144, 28, 47, 66, 85, 104, 123, 142, 161, 180, 31, 52, 73, 94, 115, 136, 157, 178, 199, 220, 34, 57, 80, 103, 126, 149, 172, 195, 218, 241, 264
Offset: 1

Views

Author

Artemario Tadeu Medeiros da Silva (artemario(AT)uol.com.br), Jun 09 2003

Keywords

Comments

T(n,k) gives number of edges (of unit length) in a k X n grid.
The values 2*T(n,k)+1 = (2*n+1)*(2*k+1) are nonprime and therefore in A047845.

Examples

			Triangle begins:
   4;
   7, 12;
  10, 17, 24;
  13, 22, 31, 40;
  16, 27, 38, 49,  60;
  19, 32, 45, 58,  71,  84;
  22, 37, 52, 67,  82,  97, 112;
  25, 42, 59, 76,  93, 110, 127, 144;
  28, 47, 66, 85, 104, 123, 142, 161, 180;
		

Crossrefs

Programs

  • Magma
    [(2*n*k + n + k): k in [1..n], n in [1..11]]; // Vincenzo Librandi, Jun 01 2014
    
  • Mathematica
    T[n_,k_]:= 2 n k + n + k; Table[T[n, k], {n, 10}, {k, n}]//Flatten (* Vincenzo Librandi, Jun 01 2014 *)
  • Python
    def T(r, c): return 2*r*c + r + c
    a = [T(r, c) for r in range(12) for c in range(1, r+1)]
    print(a) # Michael S. Branicky, Sep 07 2022
    
  • SageMath
    flatten([[2*n*k +n +k for k in range(1,n+1)] for n in range(1,14)]) # G. C. Greubel, Oct 17 2023

Formula

From G. C. Greubel, Oct 17 2023: (Start)
T(n, 1) = A016777(n).
T(n, 2) = A016873(n).
T(n, 3) = A017017(n).
T(n, 4) = A017209(n).
T(n, 5) = A017449(n).
T(n, 6) = A186113(n).
T(n, n-1) = A056220(n).
T(n, n-2) = A090288(n-2).
T(n, n-3) = A271625(n-2).
T(n, n) = 4*A000217(n).
T(2*n, n) = A033954(n).
Sum_{k=1..n} T(n, k) = A162254(n).
Sum_{k=1..n} (-1)^(k-1)*T(n, k) = A182868((n+1)/2) if n is odd otherwise A182868(n/2) + 1. (End)

Extensions

Edited by N. J. A. Sloane, Jul 23 2009
Name edited by Michael S. Branicky, Sep 07 2022

A185950 a(n) = 4*n^2 - n - 1.

Original entry on oeis.org

-1, 2, 13, 32, 59, 94, 137, 188, 247, 314, 389, 472, 563, 662, 769, 884, 1007, 1138, 1277, 1424, 1579, 1742, 1913, 2092, 2279, 2474, 2677, 2888, 3107, 3334, 3569, 3812, 4063, 4322, 4589, 4864, 5147, 5438, 5737, 6044, 6359, 6682, 7013, 7352, 7699, 8054, 8417, 8788, 9167, 9554, 9949, 10352, 10763, 11182, 11609
Offset: 0

Views

Author

Paul Curtz, Feb 07 2011

Keywords

Comments

Write the sequence A023443 in a clockwise spiral. a(n) is on the y-axis.
a(n) mod 9 = period 9: repeat [8,2,4,5,5,4,2,8,4] = A182868(n+2) mod 9.

Examples

			  11--12--13--14--15
   |               |
  10   1---2---3  16
   |   |       |   |
   9   0-(-1)  4  17
   |           |   |
   8---7---6---5  18
		

Crossrefs

Programs

Formula

a(n) = A176126(4*n-1) = A054556(n+1) - 2 = A033991(n) - 1.
a(n) = a(n-1) + 8*n - 5.
a(n) = 2*a(n-1) - a(n-2) + 8.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: ( 1-5*x-4*x^2 ) / (x-1)^3. - R. J. Mathar, Feb 10 2011
E.g.f.: (4*x^2 + 3*x - 1)*exp(x). - G. C. Greubel, Jul 23 2017

A274602 Triangle read by rows: T(n,k) = k*(n-k+1)^2 + n - k, 0 <= k <= n.

Original entry on oeis.org

0, 1, 1, 2, 5, 2, 3, 11, 9, 3, 4, 19, 20, 13, 4, 5, 29, 35, 29, 17, 5, 6, 41, 54, 51, 38, 21, 6, 7, 55, 77, 79, 67, 47, 25, 7, 8, 71, 104, 113, 104, 83, 56, 29, 8, 9, 89, 135, 153, 149, 129, 99, 65, 33, 9, 10, 109, 170, 199, 202, 185, 154, 115, 74, 37, 10
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 01 2016

Keywords

Comments

Mirrored version of a(n) is T(n,k) = (n-k)*(k+1)^2+k, 0 <= k <= n, read by rows:
0
1 1
2 5 2
3 9 11 3
4 13 20 19 4
5 17 29 35 29 5
As an infinite square array (matrix) with comments:
0 1 2 3 4 5 A001477
1 5 11 19 29 41 A028387
2 9 20 35 54 77 A014107
3 13 29 51 79 113 A144391
4 17 38 67 104 149 A182868
5 21 47 83 129 185

Examples

			0; 1,1; 2,5,2; 3,11,9,3; 4,19,20,13,4; 5,29,35,29,17,5; ...
As an infinite triangular array:
0
1   1
2   5   2
3  11   9    3
4  19  20   13    4
5  29  35   29   17    5
As an infinite square array (matrix) with comments:
0   1   2    3    4    5                   A001477
1   5   9   13   17   21                   A016813
2  11  20   29   38   47                   A017185
3  19  35   51   67   83
4  29  54   79  104  129
5  41  77  113  149  185
		

Crossrefs

Cf. Triangle read by rows: T(n,k) = k*(n-k+1)^m+n-k, 0 <= k <= n: A003056 (m = 0), A059036 (m = 1), A278910 (m = k).

Programs

  • Magma
    /* As triangle */ [[k*(n-k+1)^2+n-k: k in [0..n]]: n in [0..10]];
  • Mathematica
    Table[k (n - k + 1)^(k + #) + n - k &[2 - k], {n, 0, 10}, {k, 0, n}] // Flatten (* Michael De Vlieger, Dec 02 2016 *)
Showing 1-3 of 3 results.