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.

A367467 Lexicographically earliest infinite sequence of positive integers such that a(n + a(n)) is distinct for all n.

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 2, 5, 6, 7, 1, 8, 9, 2, 10, 11, 12, 1, 13, 14, 2, 15, 16, 2, 17, 18, 19, 2, 20, 21, 2, 22, 23, 24, 1, 25, 26, 2, 27, 28, 2, 29, 30, 31, 2, 32, 33, 2, 34, 35, 36, 1, 37, 38, 2, 39, 40, 41, 1, 42, 43, 2, 44, 45, 2, 46, 47, 48, 1, 49, 50, 2, 51, 52, 53, 1, 54, 55, 2, 56, 57, 2, 58, 59, 60, 2, 61, 62, 2
Offset: 1

Views

Author

Neal Gersh Tolunsky, Nov 18 2023

Keywords

Comments

Consider each index i as a location from which one can jump a(i) terms forward. To find a(n) we have to check 2 conditions:
1. The value a(n) can be reached in one jump by at most one previous location.
2. Location n reaches a location in one jump that is not reached in one jump from a location before n.
Described in the above way, the sequence seems to be structured as follows:
A083051 appears to give the indices which cannot be reached from any earlier term; the terms at these indices are 1s and 2s.
A087057 appears to give the indices which can be reached from an earlier term; except for a(2), these terms are first occurrences.
From Thomas Scheuerle, Nov 26 2023: (Start)
Empirical observations:
It appears that this sequence consists of the natural numbers in ascending order interspersed by 1 and 2.
If we consider the distance between successive ones, we will observe a nonperiodic pattern: 9,7,17,17,7,10,7,17,7,10,... . It appears that there are only 7, 10 and 17 with the exception of 9 once.
If we consider the distance between successive twos, we will also observe an interesting nonperiodic pattern: 3,7,7,3,4,3,7,3,4,3,7,7,3,... . It appears that this pattern consists only of 3, 4 and 7. (End)

Examples

			Initial locations and the (by definition) distinct terms that they reach:
     n|  1  2  3  4  5  6  7  8  9
  a(n)|  1  1  2  2  3  4  2  5  6
          =>1=>2====>3
                   ====>4
                      =======>5
                            ====>6
When we evaluate a(i+a(i)) with each index i, we get a distinct value. When i=1, for example, a(1+a(1))=a(1+1)=a(2)=1;  no other i gives 1 as the solution to a(i+a(i)). When i=4, a(4+a(4))=a(4+2)=a(6)=4, and 4 is likewise a solution unique to i=4.
		

Crossrefs

Programs

  • MATLAB
    function a = A367467( max_n )
        a = [1 1:2*max_n];
        for n = 3:max_n
            a(n) = 1;
            while consistency(a, n) == false
                a(n) = a(n)+1;
            end
        end
        a = a(1:max_n);
    end
    function ok = consistency(a, n)
        v = a([1:n] + a(1:n));
        ok = (n == length(unique(v)));
    end % Thomas Scheuerle, Nov 21 2023

Formula

From Thomas Scheuerle, Nov 26 2023: (Start)
Conjectures:
a(n) = A049472(n) = floor(n*(1 + 1/sqrt(2))) - n, if n is not in A083051.
a(A083051(n)) = A184119(n+1) - A083051(n).
a(a(A083051(n)) + A083051(n)) + a(A083051(n)) + A083051(n) = A328987(n) = floor((a(A083051(n)) + A083051(n))*(1 + 1/sqrt(2))) = floor(A184119(n+1)*(1 + 1/sqrt(2))). (End)

A367832 Array T(n, k) read by ascending antidiagonals is a dispersion based on A367467. Column 1 lists the numbers which cannot be represented by A367467(m) + m. For k >= 1, T(n, k+1) = A367467(T(n, k)) + T(n, k).

Original entry on oeis.org

1, 4, 2, 7, 6, 3, 11, 9, 10, 5, 14, 12, 15, 17, 8, 18, 16, 20, 25, 29, 13, 21, 19, 27, 34, 42, 49, 22, 24, 23, 32, 46, 58, 71, 83, 37, 28, 26, 39, 54, 78, 99, 121, 141, 63, 31, 30, 44, 66, 92, 133, 169, 206, 240, 107, 35, 33, 51, 75, 112, 157, 227, 288, 351, 409, 182, 38, 36, 56, 87, 128, 191, 268
Offset: 1

Views

Author

Thomas Scheuerle, Dec 02 2023

Keywords

Comments

This sequence is a permutation of the positive integers.
The array T(n, k+1) - T(n, k) for k > 1 is also a permutation of the positive integers.
Columns k > 2 together consist of all the numbers from A003152. These are all the positive numbers of the form floor(m*(1+1/sqrt(2))).
In column 2 are all the numbers from A184119. These are all the numbers of the form floor((2+sqrt(2))*m - sqrt(2)/2).
Column 2 together with the columns k > 2 are all the numbers from A087057; these are all the numbers of the form ceiling(m*sqrt(2)). Together with column 1, which consists of all the numbers from A083051, they cover all positive integers.
An alternative definition that allows this array to be obtained without using A367467:
Take for T(n, 1) and T(n, 2) the first and the second number which do not appear in any row r < n. Complete all rows by the recurrence T(n, k) = floor(T(n, k-1)*(1 + 1/sqrt(2))). Start in the first row with T(1, 1) = 1 and T(1, 2) = 2.
Let Q(n, k) = T(n, k+2) - T(n, k+1) for k > 0. Let b(m) be the row n where the integer m is found in Q. Then we will obtain for (b(n)) the sequence: 1, 1, 1, 2, 1, 3, 2, 4, 1, 3, 5, 2, 6, 4, 1, ... . If we were to remove the first occurrence of each number in this sequence, we would get the same sequence again, hence (b(n)) is a fractal sequence.

Examples

			Array T(n, k) begins:
   1,  2,  3,  5,   8,  13,  22,  37,  63,  107, ...
   4,  6, 10, 17,  29,  49,  83, 141, 240,  409, ...
   7,  9, 15, 25,  42,  71, 121, 206, 351,  599, ...
  11, 12, 20, 34,  56,  99, 169, 288, 491,  839, ...
  14, 16, 27, 46,  78, 133, 227, 387, 660, 1126, ...
  18, 19, 32, 54,  92, 157, 268, 457, 780, 1331, ...
  21, 23, 39, 66, 112, 191, 326, 556, 949, 1620, ...
  ...
		

References

  • Clark Kimberling, Fractal sequences and interspersions, Ars Combinatoria 45 (1997) 157-168.

Crossrefs

Cf. A083050 (a closely related dispersion).

Formula

T(1, k) = A293078(k).
T(n, 1) = A083051(n-1).
T(n, 2) = A184119(n).
Conjectured: T(n, 3) = A328987(n-1).
T(1, k) = 2*T(1, k-1) - T(1, k-2) + floor(T(1, k-2)/2), for k > 2.
T(n, k+1) = floor(T(n, k)*(1+1/sqrt(2))) for k > 1.
T(n, k+1) = A367467(T(n, k)) + T(n, k).

Extensions

Edited by Peter Munn, Dec 11 2023

A293077 Number of letters (0's and 1's) in the n-th iterate of the final-letter-removed mapping defined at A289035.

Original entry on oeis.org

2, 4, 6, 10, 16, 26, 44, 74, 126, 214, 364, 620, 1058, 1806, 3082, 5260, 8978, 15326, 26162, 44660, 76238, 130146, 222172, 379270, 647454, 1105272, 1886816, 3220996, 5498584, 9386670, 16024048, 27354760, 46697496, 79717612, 136086476
Offset: 1

Views

Author

Clark Kimberling, Sep 30 2017

Keywords

Comments

It follows from the comment at A289035 that every term is even.
The first seven iterates:
00
0010
001001
0010010010
0010010010001001
00100100100010010001001001
00100100100010010001001001000100100010010010
From Michel Dekking, Mar 20 2022: (Start)
Proof of the recursion in FORMULA: Let N1(n) be the number of 1's in the n-th iterate theta(n) of the final-letter-removed mapping defined in A289035.
The difficulty is that the final-letter-removed mechanism does not give the usual iteration scheme. The crucial observation is that
N1(n) = a(n-1)/2.
The reason is simple: theta(n-1) has a(n-1)/2 two-blocks at even positions, and each of them generates exactly one letter 1 in the word theta(n), since
00->0010, 01->010, 10->010.
Next we compute the length a(n) of theta(n). Let N00(n-1) be the number of blocks 00 occurring at even positions in theta(n-1), and let delta(n)= 0 if the final letter was not removed to obtain theta(n), and delta(n)= 1 if the final letter was removed. Then
(*) a(n) = 3*a(n-1)/2 + N00(n-1) - delta(n).
This holds because all a(n-1)/2 two-blocks at even positions generate a word of length at least 3, and the 00 blocks a word of length 4 = 3+1.
We have N00(n-1) = a(n-1)/2 - N1(n-1), and delta(n) = a(n)/2 - 2*floor(a(n)/2). The latter gives an awkward formula when substituted in (*), so we note that delta(n) is 1 iff N1(n-1) is odd iff a(n-2)/2 is odd. This gives delta(n) = a(n-2)/2 - 2*floor(a(n-2)/4). Substituting all this in (*) yields
a(n) = 2 a(n-1) - a(n-2) + 2*floor(a(n-2)/4).
(End)

Crossrefs

Programs

  • Mathematica
    z = 10; (* number of iterations *)
    s = {0, 0}; u[0] = StringJoin[Map[ToString, s]]; w[0] = u[0];
    u[n_] := u[n] = StringReplace[w[n - 1], {"00" -> "0010", "01" -> "010", "10" -> "010"}];
    w[n_] := w[n] = If[OddQ[StringLength[u[n]]], StringDrop[u[n], -1], u[n]];
    TableForm[Table[w[n], {n, 0, 8}]]
    st = ToCharacterCode[w[z]] - 48  (* A289035 *)
    p0 = Flatten[Position[st, 0]] (* A289036 *)
    p1 = Flatten[Position[st, 1]]  (* A289037 *)
    v = Table[StringLength[w[n]], {n, 0, 34}] (* A293077 *)
    v/2  (* A293078 *)

Formula

a(n) = 2 a(n-1) - a(n-2) + 2 floor(a(n-2)/4) - Michel Dekking, Mar 20 2022
Showing 1-3 of 3 results.