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

A347068 Rectangular array (T(n,k)), by downward antidiagonals: T(n,k) = position of k in the ordering of {h*r^m, r = 1/(golden ratio), h >= 1, 0 <= m <= n}.

Original entry on oeis.org

2, 5, 4, 7, 10, 8, 10, 14, 18, 14, 13, 20, 26, 31, 25, 15, 26, 36, 46, 53, 42, 18, 30, 47, 63, 79, 88, 71, 20, 36, 55, 81, 107, 132, 146, 117, 23, 40, 65, 96, 136, 178, 219, 239, 193, 26, 46, 73, 112, 162, 225, 294, 359, 391, 315, 28, 52, 84, 127, 189, 269
Offset: 1

Views

Author

Clark Kimberling, Sep 02 2021

Keywords

Comments

Row 1: A001950 (upper Wythoff sequence);
row 2: A283234;
row 3: A190508;
col 1: A020956.

Examples

			Corner:
    2,   5,   7,  10,  13,  15,  18,  20,  23, ...
    4,  10,  14,  20,  26,  30,  36,  40,  46, ...
    8,  18,  26,  36,  47,  55,  65,  73,  84, ...
   14,  31,  46,  63,  81,  96, 112, 127, 145, ...
   25,  53,  79, 107, 136, 162, 189, 215, 244, ...
   42,  88, 132, 178, 225, 269, 314, 358, 405, ...
   71, 146, 219, 294, 370, 443, 517, 590, 666, ...
   ...
		

Crossrefs

Programs

  • Mathematica
    z = 1000; r = N[(-1+Sqrt[5])/2];
    s[m_] := Range[z] r^m; t[0] = s[0];
    t[n_] := Sort[Union[s[n], t[n - 1]]]
    row[n_] := Flatten[Table[Position[t[n], N[k]], {k, 1, z}]]
    TableForm[Table[row[n], {n, 1, 10}]] (* A347068, array *)
    w[n_, k_] := row[n][[k]];
    Table[w[n - k + 1, k], {n, 12}, {k, n, 1, -1}] // Flatten (* A347068, sequence *)

A283233 2*A000201.

Original entry on oeis.org

2, 6, 8, 12, 16, 18, 22, 24, 28, 32, 34, 38, 42, 44, 48, 50, 54, 58, 60, 64, 66, 70, 74, 76, 80, 84, 86, 90, 92, 96, 100, 102, 106, 110, 112, 116, 118, 122, 126, 128, 132, 134, 138, 142, 144, 148, 152, 154, 158, 160, 164, 168, 170, 174, 176, 180, 184, 186
Offset: 1

Views

Author

Clark Kimberling, Mar 03 2017

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.
Taking r=1, s=(-1+sqrt(5))/2, t=(1+sqrt(5))/2 gives a=A283233, b=A283234, c=A005843.

Crossrefs

Cf. A000201, A283234, A005843 (sequential union of A283233 and A283234), A005408.

Programs

  • Mathematica
    r = 1; s = (-1 + 5^(1/2))/2; t = (1 + 5^(1/2))/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}]  (* A283233 *)
    Table[b[n], {n, 1, 120}]  (* A283234 *)
    Table[c[n], {n, 1, 120}]  (* A005408 *)
  • Python
    from math import isqrt
    def A283233(n): return (n+isqrt(5*n**2))&-2 # Chai Wah Wu, Aug 10 2022

Formula

a(n) = 2*floor(n*r), where r = (1+sqrt(5))/2.

A287802 Positions of 0 in A287801; complement of A287803.

Original entry on oeis.org

2, 3, 4, 5, 8, 9, 11, 12, 13, 14, 17, 18, 19, 20, 23, 24, 26, 27, 28, 29, 32, 33, 35, 36, 37, 38, 41, 42, 43, 44, 47, 48, 50, 51, 52, 53, 56, 57, 58, 59, 62, 63, 65, 66, 67, 68, 71, 72, 74, 75, 76, 77, 80, 81, 82, 83, 86, 87, 89, 90, 91, 92, 95, 96, 98, 99
Offset: 1

Views

Author

Clark Kimberling, Jun 03 2017

Keywords

Comments

Let d(n) = 3n/2 - a(n). Then d(n) is in {-1/2, 0, 1/2, 1} for n >= 1. Indeed,
d(n) = - 1/2 if n is in A075317; d(n) = 1/2 if n is in A075318;
d(n) = 0 if n is in A283234; d(n) = 1 if n is in A283233.

Crossrefs

Programs

  • Mathematica
    s = Nest[Flatten[# /. {0 -> {0, 1}, 1 -> {0}}] &, {0}, 10] (* A003849 *)
    w = StringJoin[Map[ToString, s]]
    w1 = StringReplace[w, {"0" -> "100", "1" -> "001"}]
    st = ToCharacterCode[w1] - 48    (* A287801 *)
    Flatten[Position[st, 0]]  (* A287802 *)
    Flatten[Position[st, 1]]  (* A287803 *)
Showing 1-3 of 3 results.