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

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

A085246 Satisfies a(1)=1, a(A026835(n+1)) = a(n)+1, with a(m)=0 for all m not found in A026835, where A026835(n+2)=A026835(n+1)+a(n)+1.

Original entry on oeis.org

1, 2, 0, 3, 0, 0, 1, 4, 0, 0, 0, 1, 1, 2, 0, 5, 0, 0, 0, 0, 1, 1, 1, 2, 0, 2, 0, 3, 0, 0, 1, 6, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 0, 2, 0, 2, 0, 3, 0, 0, 1, 3, 0, 0, 1, 4, 0, 0, 0, 1, 1, 2, 0, 7, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 0, 2, 0, 2, 0, 2, 0, 3, 0, 0, 1, 3, 0, 0, 1, 3, 0, 0, 1, 4, 0, 0, 0, 1, 1, 2, 0, 4, 0
Offset: 1

Views

Author

Paul D. Hanna, Aug 22 2003

Keywords

Comments

Removing the leading '1' and all zeros results in the original sequence with every term incremented by 1.

Examples

			Initialize all terms to zero. Set a(1)=1, go one term forward,
set a(2)=a(1)+1=2, go 2 terms forward,
set a(4)=a(2)+1=3, go 3 terms forward,
set a(7)=a(3)+1=1, go 1 term forward,
set a(8)=a(4)+1=4, go 4 terms forward,
set a(12)=a(5)+1=1, etc.
The indices 1,2,4,7,8,12,... form A085262.
		

Crossrefs

Cf. A085262.

Formula

Records occur at 2^n: a(2^n)=n+1.
Showing 1-2 of 2 results.