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.

A097285 Contains exactly once every pair (i,j) of distinct positive integers.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Aug 05 2004

Keywords

Crossrefs

Cf. A097286.

Programs

  • Maple
    A097285:= proc(n) local k,j;
       k:= floor(sqrt(n-3/4)-1/2);
       j:= floor((n-k^2-k)/2);
       if n::odd then j+1 else k+2 fi
    end proc;
    seq(A097285(n),n=1..100); # Robert Israel, May 08 2014
  • Mathematica
    S = {1, 2}; Do[S = Join[S, Riffle[Range[n-1], n], {n}], {n, 3, 12}];
    S (* Jean-François Alcover, Apr 11 2019 *)

Formula

Juxtapose segments: 1 2, then 1 3 2 3, then 1 4 2 4 3 4. General segment is 1 n 2 n ... n-1 n, followed by 1, so that clearly, every ij is uniquely present.