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

A097292 Rectangular array T, by antidiagonals: T(n,k) = rank of n in A097291 at which the pair (n,k) occurs.

Original entry on oeis.org

1, 2, 4, 5, 3, 9, 10, 8, 7, 16, 17, 13, 6, 12, 25, 26, 20, 15, 14, 19, 36, 37, 29, 22, 11, 21, 28, 49, 50, 40, 31, 24, 23, 30, 39, 64, 65, 53, 42, 33, 18, 32, 41, 52, 81, 82, 68, 55, 44, 35, 34, 43, 54, 67, 100, 101, 85, 70, 57, 46, 27, 45, 56, 69, 84, 121
Offset: 1

Views

Author

Clark Kimberling, Aug 05 2004

Keywords

Comments

Row 1 is A002522.
Column 1 (squares) is A002900.
Main diagonal is 2+(n-1)^2 for n>1, cf. A010000.

Examples

			Northwest corner:
   1  2  5  10
   4  3  8  13
   9  7  6  15
  16 12 14  11
T(3,4) = 15 because in A097291, the pair 3,4 occurs at positions 15,16.
		

Crossrefs

A097347 Rectangular array, by antidiagonals: T(n,k) = rank of k-th n in A097291.

Original entry on oeis.org

1, 2, 3, 5, 4, 6, 10, 8, 7, 11, 17, 13, 9, 12, 18, 26, 20, 15, 14, 19, 27, 37, 29, 22, 16, 21, 28, 38, 50, 40, 31, 24, 23, 30, 39, 51, 65, 53, 42, 33, 25, 32, 41, 52, 66, 82, 68, 55, 44, 35, 34, 43, 54, 67, 83, 101, 85, 70, 57, 46, 36, 45, 56, 69, 84, 102, 122, 104, 87, 72, 59
Offset: 1

Views

Author

Clark Kimberling, Aug 06 2004

Keywords

Comments

As a sequence, this is a permutation of the natural numbers. Row 1 is A002522 (n^2 + 1); main diagonal is A000290 (n^2); column 1 is A010000 (n^2 + 2).

Examples

			Northwest corner:
1 2 5 10
3 4 8 13
6 7 9 15
11 12 14 16
		

Crossrefs

A269501 Subsequence immediately following the instances of n in the sequence is n, n-1, ..., 1, n+1, n+2, ....

Original entry on oeis.org

1, 1, 2, 2, 1, 3, 3, 2, 3, 1, 4, 4, 3, 4, 2, 4, 1, 5, 5, 4, 5, 3, 5, 2, 5, 1, 6, 6, 5, 6, 4, 6, 3, 6, 2, 6, 1, 7, 7, 6, 7, 5, 7, 4, 7, 3, 7, 2, 7, 1, 8, 8, 7, 8, 6, 8, 5, 8, 4, 8, 3, 8, 2, 8, 1, 9, 9, 8, 9, 7, 9, 6, 9, 5, 9, 4, 9, 3, 9, 2, 9, 1, 10, 10, 9, 10, 8, 10, 7, 10, 6, 10, 5, 10, 4, 10, 3, 10, 2, 10, 1
Offset: 0

Views

Author

Keywords

Comments

The sequence includes every ordered pair of positive integers exactly once as consecutive terms of the sequence. Through n = k^2, it has every pair i,j with 0 < i,j <= k.
Can be regarded as an irregular triangle where row k contains 1, k, k, k-1, k, k-2, ..., 2, k, with 2n-1 terms.
See A305615 for an essentially identical sequence: a(n) = A305615(n)+1. - N. J. A. Sloane, Jul 03 2018

Examples

			The first 3 occurs as a(5), so a(6) = 3, the first term of 3, 2, 1, 4, 5, 6, .... The second 3 is thus a(6), so a(7) = 2. The third 3 is a(8), so a(9) = 1. The fourth 3 is a(12), now we start incrementing, and a(13) = 4.
The triangle starts:
  1
  1, 2, 2
  1, 3, 3, 2, 3
  1, 4, 4, 3, 4, 2, 4
  1, 5, 5, 4, 5, 3, 5, 2, 5
		

Crossrefs

Cf. A003059, A060747 (row lengths), A000326 (row sums), A097291, A269780.
See also A315615.

Programs

  • PARI
    a(n) = my(r = if(n<=0, 0, sqrtint(n-1)+1));if((n-r)%2,r,(r^2-n)/2 + 1)

Formula

Let r = ceiling(sqrt(n)) = A003059(n). If n and r have the same parity, a(n) = (r^2-n)/2 + 1; otherwise a(n) = r.

A097289 Contains exactly once every pair (i,j) satisfying 0 < i <= j.

Original entry on oeis.org

1, 1, 2, 2, 1, 3, 3, 1, 4, 4, 2, 3, 1, 5, 5, 2, 4, 1, 6, 6, 2, 5, 3, 4, 1, 7, 7, 2, 6, 3, 5, 1, 8, 8, 2, 7, 3, 6, 4, 5, 1, 9, 9, 2, 8, 3, 7, 4, 6, 1, 10, 10, 2, 9, 3, 8, 4, 7, 5, 6, 1, 11, 11, 2, 10, 3, 9, 4, 8, 5, 7, 1, 12, 12, 2, 11, 3, 10, 4, 9, 5, 8, 6, 7, 1, 13, 13, 2, 12, 3, 11, 4, 10, 5, 9, 6, 8, 1
Offset: 1

Views

Author

Clark Kimberling, Aug 05 2004

Keywords

Comments

All pairs (i,j) having i>j occur (not necessarily uniquely) except those of the form (i,i-1) for i>=3. (Those are included at A097291.)

Crossrefs

Formula

Obtained from A097283 by inserting m right after the first occurrence of m, for each positive integer m.
Showing 1-4 of 4 results.