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.

A289870 a(n) = n*(n + 1) for n odd, otherwise a(n) = (n - 1)*(n + 1).

Original entry on oeis.org

-1, 2, 3, 12, 15, 30, 35, 56, 63, 90, 99, 132, 143, 182, 195, 240, 255, 306, 323, 380, 399, 462, 483, 552, 575, 650, 675, 756, 783, 870, 899, 992, 1023, 1122, 1155, 1260, 1295, 1406, 1443, 1560, 1599, 1722, 1763, 1892, 1935, 2070, 2115, 2256, 2303, 2450, 2499
Offset: 0

Views

Author

Keywords

Comments

a(n) is a fifth-order linear recurrence whose main interest is that it is related to (at least) eight other sequences (see the formula section).

Crossrefs

After -1, subsequence of A035106, A198442 and A214297.

Programs

  • Mathematica
    a[n_] := (n + 1)(n - 1 + Mod[n, 2]); Table[a[n], {n, 0, 50}]
  • PARI
    a(n)=if(n%2, n, n-1)*(n+1) \\ Charles R Greathouse IV, Jul 14 2017

Formula

a(n) = (n + 1)*(n - 1 + (n mod 2)).
a(n) = n * A109613(n-1) for n>0.
a(n) = -A114285(n) * A109613(n).
a(n) = A002378(n) - A193356(n).
a(n) = A289296(-n).
a(n) = n^2 - (-1)^n * A093178(n).
a(2*k) = A000466(k).
G.f.: (1-3*x-3*x^2-3*x^3)/((-1+x)^3*(1+x)^2).

A318958 A(n, k) is a square array read in the decreasing antidiagonals, for n >= 0 and k >= 0.

Original entry on oeis.org

0, 0, 0, 0, -1, -1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 2, 2, 3, 2, 2, 0, 1, 3, 3, 4, 3, 3, 0, 3, 4, 6, 6, 7, 6, 6, 0, 2, 5, 6, 8, 8, 9, 8, 8, 0, 4, 6, 9, 10, 12, 12, 13, 12, 12, 0, 3, 7, 9, 12, 13, 15, 15, 16, 15, 15, 0, 5, 8, 12, 14, 17, 18, 20, 20, 21, 20, 20
Offset: 0

Views

Author

Paul Curtz, Sep 06 2018

Keywords

Examples

			The array starts:
[n\k][0,   1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, ...]
[0]   0,   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, ... = A000004
[1]   0,  -1,  1,  0,  2,  1,  3,  2,  4,  3,  5,  4, ... = A028242(n-2)
[2]  -1,   0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, ... = A023443(n)
[3]   0,   0,  3,  3,  6,  6,  9,  9, 12, 12, 15, 15, ... = 3*A004526(n)
[4]   0,   2,  4,  6,  8, 10, 12, 14, 16, 18, 20, 22, ... = A005843(n)
[5]   2,   3,  7,  8, 12, 13, 17, 18, 22, 23, 27, 28, ... = A047221(n+1)
[6]   3,   6,  9, 12, 15, 18, 21, 24, 27, 30, 33, 36, ... = A008585(n+1)
[7]   6,   8, 13, 15, 20, 22, 27, 29, 34, 36, 41, 43, ... = A047336(n+2)
[8]   8,  12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, ... = A008586(n+2)
Successive columns: A198442(n-2), A198442(n-1), A004652(n), A198442(n+1), A198442(n+2), A079524(n), ... .
First subdiagonal: 0, 0, 3, 6, ... = A242477(n).
First upperdiagonal: 0, 1, 2, 6, 10, ... = A238377(n-1).
Array written as a triangle:
0;
0,  0;
0, -1, -1;
0,  1,  0, 0;
0,  0,  1, 0, 0;
0,  2,  2, 3, 2, 2;
etc.
		

Crossrefs

Programs

  • Maple
    A := proc(n, k) option remember; local h;
    h := n -> `if`(n<3, [0, 0, -1][n+1], iquo(n^2-4*n+3, 4));
    if k = 0 then h(n) elif k = 1 then h(n+1) else A(n, k-2) + n fi end: # Peter Luschny, Sep 08 2018
  • Mathematica
    h[n_] := If[n < 3, {0, 0, -1}[[n + 1]], Quotient[n^2 - 4 n + 3, 4]];
    A[n_, k_] := A[n, k] = If[k == 0, h[n], If[k == 1, h[n+1], A[n, k-2] + n]];
    Table[A[n - k, k], {n, 0, 11}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Jul 22 2019, after Peter Luschny *)

Formula

Let h(n) = 0, 0, -1, A198442(1), A198442(2), A198442(3), ... Then A(n, 0) = h(n), A(n, 1) = h(n+1) and A(n, k) = A(n, k-2) + n otherwise.

A132169 Irregular triangle read by rows. A141616(n)/4.

Original entry on oeis.org

2, 3, 6, 4, 8, 5, 12, 10, 6, 15, 12, 7, 20, 18, 14, 8, 24, 21, 16, 9, 30, 28, 24, 18, 10, 35, 32, 27, 20, 11, 42, 40, 36, 30, 22, 12, 48, 45, 40, 33, 24, 13, 56, 54, 50, 44, 36, 26, 14, 63, 60, 55, 48, 39, 28, 15, 72, 70, 66, 60, 52, 42, 30, 16
Offset: 0

Views

Author

Paul Curtz, Aug 26 2008

Keywords

Comments

From Paul Curtz, Apr 14 2016: (Start)
Row sums: A023856.
Even rows: A120070.
Odd rows:
2,
6, 4,
12, 10, 6,
etc.
Divided by 2:
1,
3, 2,
6, 5, 3,
10, 9, 7, 4,
15, 14, 12, 9, 5,
etc.
This is A049777. Or positive A049780.
Also A271668 without the first column and bordered by the natural numbers as main diagonal.
(End)

Examples

			Irregular triangle:
2,
3,
6,   4,
8,   5,
12, 10, 6,
15, 12, 7,
20, 18, 14,  8,
24, 21, 16,  9,
30, 28, 24, 18, 10,
35, 32, 27, 20, 11,
etc.
		

Crossrefs

Programs

  • Mathematica
    (Table[n^2 - k^2, {n, 3, 18}, {k, n}] /. m_ /; Or[OddQ@ m, m == 0] -> Nothing)/4 // Flatten (* Michael De Vlieger, Apr 14 2016 *)

Extensions

Edited by Charles R Greathouse IV, Nov 11 2009
Previous Showing 11-13 of 13 results.