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.

A365342 Positions of records in A087704.

Original entry on oeis.org

2, 5, 10, 82, 284, 680, 1322, 68104, 149795, 213895, 1023127, 3775307, 25396927, 36254395, 53343289, 68677522, 266888359, 366901277, 558829814, 1576699732, 8527370677, 11616255230, 16948492520, 167299409017, 222801579737, 2001199132825, 5024272986979, 7880897129684
Offset: 1

Views

Author

Robert Israel, Sep 01 2023

Keywords

Comments

Numbers k such that iteration of the map x -> (5/3)*floor(x) starting at x = k takes more steps to reach an integer > k than it does for any number from 2 to k - 1.

Examples

			a(3) = 10 is a term because A087704(10) = 9 and A087704(k) < 9 for 2 <= k < 10.
		

Crossrefs

Programs

  • Maple
    g:= x -> 5/3 * floor(x):
    h:= proc(n) local i,k;
      k:= g(n);
      for i from 1 while not (k::integer and k > n) do k:= g(k) od:
      i
    end proc:
    M:= 2: A:= 2: count:= 1:
    for n from 3 while count < 17  do
      v:= h(n);
      if v > M then count:= count+1; A:= A,n; M:= v fi;
    od:
    A;
  • Mathematica
    g =  5/3 * Floor[#]&;
    h[n_] := Module[{i, k}, k = g[n]; For[i = 1, !IntegerQ[k] && k > n, i++,  k = g[k]]; i];
    M = 2; A = {2}; count = 1;
    For[n = 3, count < 17, n++, v = h[n]; If[v > M, count++; A = Append[A, n]; Print[A]; M = v]];
    A (* Jean-François Alcover, Sep 14 2023, after Robert Israel *)

Formula

A087704(a(n)) = A365343(n).

Extensions

a(18)-a(21) from Chai Wah Wu, Sep 02 2023
a(22)-a(28) from Martin Ehrenstein, Sep 03 2023

A365367 Number of steps for iteration of map x -> (5/3)*round(x) to reach an integer > n when started at n, or -1 if no such integer is ever reached.

Original entry on oeis.org

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

Views

Author

Chai Wah Wu, Sep 02 2023

Keywords

Comments

Conjecture: an integer will always be reached, i.e. a(n) > 0 for all n.

Crossrefs

Programs

  • Python
    from fractions import Fraction
    def A365367(n):
        x, c = Fraction(n), 0
        while x.denominator > 1 or x<=n:
            x = Fraction(5*x._round_(),3)
            c += 1
        return c

A365344 a(0) = 0; for n > 0, a(n) is the largest distance squared on a square spiral between a(n-1) and any previous occurrence of a(n-1). If a(n-1) has not previously occurred then a(n) = 0.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 4, 0, 4, 4, 9, 0, 10, 0, 10, 4, 18, 0, 16, 0, 20, 0, 20, 4, 20, 16, 29, 0, 26, 0, 34, 0, 34, 4, 26, 20, 41, 0, 40, 0, 40, 4, 34, 72, 0, 45, 0, 41, 61, 0, 74, 0, 58, 0, 50, 0, 61, 50, 5, 0, 58, 32, 0, 85, 0, 113, 0, 89, 0, 73, 0, 89, 16, 53, 0, 85, 68, 0, 89, 61, 65, 0, 145, 0
Offset: 0

Views

Author

Scott R. Shannon, Oct 16 2023

Keywords

Examples

			The spiral begins:
.
  41--20--26--4---34--0---34  .
  |                       |   .
  0   18--4---10--0---10  0   50
  |   |               |   |   |
  40  0   2---0---1   0   26  0
  |   |   |       |   |   |   |
  0   16  0   0---0   9   0   58
  |   |   |           |   |   |
  40  0   4---0---4---4   29  0
  |   |                   |   |
  4   20--0---20--4---20--16  74
  |                           |
  34--72--0---45--0---41--61--0
.
.
a(4) = 2 as a(3) = 0 and the largest square distance between a(3) and a previous occurrence of 0 is 2 - between a(3) and a(1).
a(47) = 41 as a(46) = 0 and the largest square distance between a(46) and a previous occurrence of 0 is 41 - between a(46) and a(37). This is the first term to differ from A365343.
		

Crossrefs

Showing 1-3 of 3 results.