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)

A367039 a(1) = 0, a(2) = 1; thereafter a(n) is the largest index < n not equal to i +- a(i) for any i = 1..n-1.

Original entry on oeis.org

0, 1, 2, 2, 4, 4, 4, 7, 8, 8, 8, 8, 12, 13, 14, 14, 16, 16, 16, 16, 16, 21, 22, 23, 24, 24, 26, 26, 28, 28, 28, 31, 32, 32, 32, 32, 32, 32, 38, 39, 40, 41, 42, 42, 44, 44, 46, 46, 48, 48, 48, 51, 52, 52, 52, 55, 56, 56, 56, 56, 60, 61, 62, 62, 64, 64, 64, 64, 64, 64, 64
Offset: 1

Views

Author

Neal Gersh Tolunsky, Nov 02 2023

Keywords

Comments

It appears that A085262 gives the distinct values of this sequence (except for the initial zero).
The sequence is nondecreasing.

Examples

			a(8)=7 because 7 is the largest index that cannot be expressed as the sum a(i)+-i for any i < n. 4 also cannot be expressed in this way, but it is smaller than 7.
Another way to see this is to consider each index i as a location from which one can jump a(i) terms forward or backward. For a(8)=7, we find the largest index which cannot be reached in this way (a smaller index being i=4):
0, 1, 2, 2, 4, 4, 4
0<-1
0, 1, 2, 2, 4, 4, 4
   1<----2
0, 1, 2, 2, 4, 4, 4
   1->2<----------4
0, 1, 2, 2, 4, 4, 4
         ?
0, 1, 2, 2, 4, 4, 4
      2---->4
0, 1, 2, 2, 4, 4, 4
         2---->4
0, 1, 2, 2, 4, 4, 4
                  ?
		

Crossrefs

A367026 a(1) = 0, a(2) = 1; thereafter a(n) is the smallest index < n not equal to i +- a(i) for any i = 1..n-1.

Original entry on oeis.org

0, 1, 2, 2, 4, 4, 4, 4, 7, 7, 7, 7, 7, 7, 8, 8, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 15, 15, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 25, 25, 25, 25, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40
Offset: 1

Views

Author

Neal Gersh Tolunsky, Nov 01 2023

Keywords

Comments

The sequence is nondecreasing.

Examples

			a(3)=2 because a(2)=1 has i - a(i) = 2-1 = 1, which means that 1 cannot be a term (since it can be expressed as i - a(i) for some index i in the sequence thus far). 2 cannot be reached in this way, so a(3)=2.
a(5)=4 because 1 = 2 - a(2) (as seen above); 2 = 4 - a(4); and 3 = 2 + a(2). 4 cannot be the answer to any such expression, so a(5)=4.
Another way to see this is to consider each index i as a location from which one can jump forward or back a(i) terms. To find a(5), we see that there is no way to reach i=4, which is the smallest-indexed location with this property.
0, 1, 2, 2
0<-1
0, 1, 2, 2
   1<----2
0, 1, 2, 2
   1->2
0, 1, 2, 2
         ?
		

Crossrefs

Showing 1-3 of 3 results.