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.

A186352 Adjusted joint rank sequence of (f(i)) and (g(j)) with f(i) after g(j) when f(i)=g(j), where f and g are the odd numbers and the triangular numbers. Complement of A186353.

Original entry on oeis.org

2, 4, 5, 7, 8, 10, 11, 13, 14, 15, 17, 18, 19, 20, 22, 23, 24, 25, 27, 28, 29, 30, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 52, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 88, 89, 90, 91, 92, 94, 95, 96, 97, 98, 99, 100, 101, 102, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 137, 138, 139, 140, 141
Offset: 1

Views

Author

Clark Kimberling, Feb 18 2011

Keywords

Examples

			First, write
1..3..5..7..9..11..13..15..17..21..23.. (odds)
1..3....6.....10.......15......21.... (triangular)
Then replace each number by its rank, where ties are settled by ranking the odd number after the triangular:
a=(2,4,5,7,8,10,11,13,14,15,....)=A186352
b=(1,3,6,9,12,16,21,26,31,37,...)=A186353.
		

Crossrefs

Programs

  • Mathematica
    (* adjusted joint rank sequences a and b, using general formula for ranking 1st degree u*n+v and 2nd degree x*n^2+y*n+z *)
    d=-1/2; u=2; v=-1; x=1/2; y=1/2; (* odds and triangular *)
    h[n_]:=(-y+(4x(u*n+v-d)+y^2)^(1/2))/(2x);
    a[n_]:=n+Floor[h[n]]; (* rank of u*n+v *)
    k[n_]:=(x*n^2+y*n-v+d)/u;
    b[n_]:=n+Floor[k[n]]; (* rank of x*n^2+y*n+d *)
    Table[a[n], {n, 1, 120}]  (* A186352 *)
    Table[b[n], {n, 1, 100}]  (* A186353 *)

Formula

a(n)=n+floor(-1/2+sqrt(4n-3/4))=A186352(n).
b(n)=n+floor((n^2+n+1)/4)=A186353(n).