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

A186221 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 triangular numbers and squares. Complement of A186222.

Original entry on oeis.org

2, 3, 5, 7, 8, 10, 12, 14, 15, 17, 19, 20, 22, 24, 25, 27, 29, 31, 32, 34, 36, 37, 39, 41, 43, 44, 46, 48, 49, 51, 53, 54, 56, 58, 60, 61, 63, 65, 66, 68, 70, 72, 73, 75, 77, 78, 80, 82, 84, 85, 87, 89, 90, 92, 94, 95, 97, 99, 101, 102, 104, 106, 107, 109, 111, 113, 114, 116, 118, 119, 121, 123, 124, 126, 128, 130, 131, 133, 135, 136, 138, 140, 142, 143, 145, 147, 148, 150, 152, 153, 155, 157, 159, 160, 162, 164, 165, 167, 169, 171
Offset: 1

Views

Author

Clark Kimberling, Feb 15 2011

Keywords

Comments

See A186219.

Examples

			First, write
1..3...6..10..15...21..28..36..45...  (triangular)
1....4...9......16...25....36....49.. (square)
Replace each number by its rank, where ties are settled by ranking the triangular number after the square:
a=(2,3,5,7,8,10,12,14,...)
b=(1,4,6,9,11,13,16,18,...).
		

Crossrefs

Programs

  • Magma
    [n + Floor(Sqrt((n^2+n)/2 + 1/4)): n in [1..120]]; // G. C. Greubel, Aug 18 2018
  • Mathematica
    (* adjusted joint ranking; general formula *)
    d=-1/4; u=1/2; v=1/2; w=0; x=1; y=0; z=0;
    h[n_]:=-y+(4x(u*n^2+v*n+w-z-d)+y^2)^(1/2);
    a[n_]:=n+Floor[h[n]/(2x)];
    k[n_]:=-v+(4u(x*n^2+y*n+z-w+d)+v^2)^(1/2);
    b[n_]:=n+Floor[k[n]/(2u)];
    Table[a[n],{n,1,100}] (* A186221 *)
    Table[b[n],{n,1,100}] (* A186222 *)
    a[ n_] := n + Floor[ Sqrt[ n (n + 1)/2]]; (* Michael Somos, Aug 19 2018 *)
  • PARI
    vector(120, n, n + floor(sqrt((n^2+n)/2 + 1/4))) \\ G. C. Greubel, Aug 18 2018
    {a(n) = n + sqrtint( n * (n+1) \ 2)}; /* Michael Somos, Aug 19 2018 */
    

Formula

a(n) = n + floor(sqrt((n^2+n)/2 + 1/4)).
a(n) = A061288(n) - n for all n in Z. - Michael Somos, Aug 19 2018

A186219 Adjusted joint rank sequence of (f(i)) and (g(j)) with f(i) before g(j) when f(i)=g(j), where f and g are the triangular numbers and squares. Complement of A186220.

Original entry on oeis.org

1, 3, 5, 7, 8, 10, 12, 13, 15, 17, 19, 20, 22, 24, 25, 27, 29, 31, 32, 34, 36, 37, 39, 41, 43, 44, 46, 48, 49, 51, 53, 54, 56, 58, 60, 61, 63, 65, 66, 68, 70, 72, 73, 75, 77, 78, 80, 82, 83, 85, 87, 89, 90, 92, 94, 95, 97, 99, 101, 102, 104, 106, 107, 109, 111, 113, 114, 116, 118, 119, 121, 123, 124, 126, 128, 130, 131, 133, 135, 136, 138, 140, 142, 143, 145, 147, 148, 150, 152, 153, 155, 157, 159, 160, 162, 164, 165, 167, 169, 171
Offset: 1

Views

Author

Clark Kimberling, Feb 15 2011

Keywords

Comments

Suppose that f and g are strictly increasing functions for which (f(i)) and (g(j)) are integer sequences. If 0<|d|<1, the sets F={f(i): i>=1} and G={g(j)+d: j>=1} are clearly disjoint. Let f^=(inverse of f) and g^=(inverse of g). When the numbers in F and G are jointly ranked, the rank of f(n) is a(n):=n+floor(g^(f(n))-d), and the rank of g(n)+d is b(n):=n+floor(f^(g(n))+d). Therefore, the sequences a and b are a complementary pair.
Although the sequences (f(i)) and (g(j)) may not be disjoint, the sequences (f(i)) and (g(j)+d) are disjoint, and this observation enables two types of adjusted joint rankings:
(1) if 0
Using f(i)=ui^2+vi+w and g(j)=xj^2+yj+z, we can carry out adjusted joint rankings of any pair of polygonal sequences (triangular, square, pentagonal, etc.) In this case,
a(n)=n+floor((-y+sqrt(4x(un^2+vn+w-z-d)+y^2))/(2x)),
b(n)=n+floor((-v+sqrt(4u(xn^2+yn+z-w+d)+v^2)/(2u)),
where a(n) is the rank of un^2+vn+w and b(n) is the rank
of xn^2+yn+z+d, where d must be chosen small enough, in
absolute value, that the sets F and G are disjoint.
Example: f=A000217 (triangular numbers) and g=A000290 (squares) yield adjusted rank sequences a=A186219 and b=A186220 for d=1/4 and a=A186221 and b=A186222 for d=-1/4.

Examples

			First, write
1..3...6..10..15...21..28..36..45...  (triangular)
1....4.. 9......16...25....36....49.. (square)
Replace each number by its rank, where ties are settled by ranking the triangular number before the square:
a=(1,3,5,7,8,10,12,13,...)
b=(2,4,6,9,11,14,16,18,...).
		

Crossrefs

Cf. A186145 (joint ranks of squares and cubes),
A000217 (triangular numbers),
A000290 (squares),
A186220 (complement of A186119)
A186221 ("after" instead of "before")
A186222 (complement of A186221).

Programs

  • Magma
    [n + Floor(Sqrt((n^2 + n)/2 - 1/4)): n in [1..100]]; // G. C. Greubel, Aug 26 2018
  • Mathematica
    (* adjusted joint ranking of triangular numbers and squares, using general formula *)
    d=1/4; u=1/2; v=1/2; w=0; x=1; y=0; z=0;
    h[n_]:=-y+(4x(u*n^2+v*n+w-z-d)+y^2)^(1/2);
    a[n_]:=n+Floor[h[n]/(2x)]; (* rank of triangular n(n+1)/2 *)
    k[n_]:=-v+(4u(x*n^2+y*n+z-w+d)+v^2)^(1/2);
    b[n_]:=n+Floor[k[n]/(2u)]; (* rank of square n^2 *)
    Table[a[n],{n,1,100}] (* A186219 *)
    Table[b[n],{n,1,100}] (* A186220 *)
  • PARI
    vector(100, n, n + floor(sqrt((n^2 + n)/2 - 1/4))) \\ G. C. Greubel, Aug 26 2018
    

Formula

a(n) = n + floor(sqrt((n^2+n)/2 - 1/4)), (A186219).
b(n) = n + floor((-1 + sqrt(8*n^2+3))/2), (A186220).

A186220 Adjusted joint rank sequence of (g(i)) and (f(j)) with f(i) before g(j) when f(i)=g(j), where f and g are the triangular numbers and squares. Complement of A186219.

Original entry on oeis.org

2, 4, 6, 9, 11, 14, 16, 18, 21, 23, 26, 28, 30, 33, 35, 38, 40, 42, 45, 47, 50, 52, 55, 57, 59, 62, 64, 67, 69, 71, 74, 76, 79, 81, 84, 86, 88, 91, 93, 96, 98, 100, 103, 105, 108, 110, 112, 115, 117, 120, 122, 125, 127, 129, 132, 134, 137, 139, 141, 144, 146, 149, 151, 154, 156, 158, 161, 163, 166, 168, 170, 173, 175, 178, 180, 182, 185, 187, 190, 192, 195, 197, 199, 202, 204, 207, 209, 211, 214, 216, 219, 221, 224, 226, 228, 231, 233, 236, 238, 240
Offset: 1

Author

Clark Kimberling, Feb 15 2011

Keywords

Comments

See A186219.

Examples

			First, write
1..3...6..10..15...21..28..36..45...  (triangular)
1....4.. 9......16...25....36....49.. (square)
Replace each number by its rank, where ties are settled by ranking the triangular number before the square:
a=(1,3,5,7,8,10,12,13,...) = A186219;
b=(2,4,6,9,11,14,16,18,...) = A186220.
		

Crossrefs

Programs

  • Magma
    [n + Floor((-1 + Sqrt(8*n^2 + 3))/2): n in [1..100]]; // G. C. Greubel, Aug 26 2018
  • Mathematica
    (See A186219.)
    Table[n + Floor[(-1 + Sqrt[8*n^2 + 3])/2], {n, 1, 100}] (* G. C. Greubel, Aug 26 2018 *)
  • PARI
    vector(100, n, n + floor((-1 + sqrt(8*n^2 + 3))/2)) \\ G. C. Greubel, Aug 26 2018
    

Formula

See A186219.

A189457 a(n) = n+[ns/r]+[nt/r]; r=2, s=sqrt(2), t=1+sqrt(2).

Original entry on oeis.org

2, 5, 8, 10, 14, 17, 19, 22, 25, 29, 31, 34, 37, 39, 43, 46, 49, 51, 54, 58, 60, 63, 66, 68, 72, 75, 78, 80, 84, 87, 89, 92, 95, 99, 101, 104, 107, 109, 113, 116, 118, 121, 124, 128, 130, 133, 136, 138, 142, 145, 148, 150, 153, 157, 159, 162, 165, 169, 171, 174, 177, 179, 183, 186, 188, 191, 194, 198, 200, 203, 206, 208, 212, 215, 218, 220, 223, 227, 229, 232, 235, 237, 241, 244
Offset: 1

Author

Clark Kimberling, Apr 22 2011

Keywords

Comments

This is one of three sequences that partition the positive integers. In general, suppose that r, s, t are positive real numbers for which the sets {i/r: i>=1}, {j/s: j>=1}, {k/t: k>=1} are pairwise disjoint. Let a(n) be the rank of n/r when all the numbers in the three sets are jointly ranked. Define b(n) and c(n) as the ranks of n/s and n/t. It is easy to prove that
a(n) = n + [ns/r] + [nt/r],
b(n) = n + [nr/s] + [nt/s],
c(n) = n + [nr/t] + [ns/t], where []=floor.
With r=2, s=sqrt(2), t=1+sqrt(2), a=A189457, b=A189458, c=A186222 (conjectured).

Crossrefs

Programs

  • Magma
    [Floor(n + Floor(n*Sqrt(2)/2) + Floor(n*(1+Sqrt(2))/2)): n in [1..120]]; // G. C. Greubel, Aug 19 2018
  • Mathematica
    r=2; s=2^(1/2); t=1+2^(1/2);
    a[n_] := n + Floor[n*s/r] + Floor[n*t/r];
    b[n_] := n + Floor[n*r/s] + Floor[n*t/s];
    c[n_] := n + Floor[n*r/t] + Floor[n*s/t];
    Table[a[n], {n, 1, 120}]  (*A189457*)
    Table[b[n], {n, 1, 120}]  (*A189458*)
    Table[c[n], {n, 1, 120}]  (*A186222, conjectured*)
  • PARI
    vector(120, n, floor(n+floor(n*sqrt(2)/2)+floor(n*(1+sqrt(2))/2))) \\ G. C. Greubel, Aug 19 2018
    

A189458 a(n) = n+[nr/s]+[nt/s]; r=2, s=sqrt(2), t=1+sqrt(2).

Original entry on oeis.org

3, 7, 12, 15, 20, 24, 27, 32, 36, 41, 44, 48, 53, 56, 61, 65, 70, 73, 77, 82, 85, 90, 94, 97, 102, 106, 111, 114, 119, 123, 126, 131, 135, 140, 143, 147, 152, 155, 160, 164, 167, 172, 176, 181, 184, 189, 193, 196, 201, 205, 210, 213, 217, 222, 225, 230, 234, 239, 242, 246, 251, 254, 259, 263, 266, 271, 275, 280, 283, 287, 292, 295, 300, 304, 309, 312, 316, 321, 324, 329, 333, 336, 341
Offset: 1

Author

Clark Kimberling, Apr 22 2011

Keywords

Comments

See A189457.

Crossrefs

Programs

  • Magma
    [n+Floor((2*n)/Sqrt(2))+Floor((n*(1+Sqrt(2)))/Sqrt(2)): n in [1..120]]; // G. C. Greubel, Aug 19 2018
  • Mathematica
    r=2; s=2^(1/2); t=1+2^(1/2);
    a[n_] := n + Floor[n*s/r] + Floor[n*t/r];
    b[n_] := n + Floor[n*r/s] + Floor[n*t/s];
    c[n_] := n + Floor[n*r/t] + Floor[n*s/t];
    Table[a[n], {n, 1, 120}]  (*A189457*)
    Table[b[n], {n, 1, 120}]  (*A189458*)
    Table[c[n], {n, 1, 120}]  (*A186222, conjectured*)
    Table[n+Floor[(2n)/Sqrt[2]]+Floor[(n(1+Sqrt[2]))/Sqrt[2]],{n,90}] (* Harvey P. Dale, Feb 04 2015 *)
  • PARI
    vector(120, n, n+floor((2*n)/sqrt(2))+floor((n*(1+sqrt(2)))/sqrt(2))) \\ G. C. Greubel, Aug 19 2018
    
Showing 1-5 of 5 results.