login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 4

%I #22 Nov 04 2023 13:49:36

%S 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,

%T 26,28,28,28,31,32,32,32,32,32,32,38,39,40,41,42,42,44,44,46,46,48,48,

%U 48,51,52,52,52,55,56,56,56,56,60,61,62,62,64,64,64,64,64,64,64

%N 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.

%C It appears that A085262 gives the distinct values of this sequence (except for the initial zero).

%C The sequence is nondecreasing.

%H Neal Gersh Tolunsky, <a href="/A367039/b367039.txt">Table of n, a(n) for n = 1..10000</a>

%e 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.

%e 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):

%e 0, 1, 2, 2, 4, 4, 4

%e 0<-1

%e 0, 1, 2, 2, 4, 4, 4

%e 1<----2

%e 0, 1, 2, 2, 4, 4, 4

%e 1->2<----------4

%e 0, 1, 2, 2, 4, 4, 4

%e ?

%e 0, 1, 2, 2, 4, 4, 4

%e 2---->4

%e 0, 1, 2, 2, 4, 4, 4

%e 2---->4

%e 0, 1, 2, 2, 4, 4, 4

%e ?

%Y Cf. A359807, A085262, A367026.

%K nonn

%O 1,3

%A _Neal Gersh Tolunsky_, Nov 02 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 10 01:34 EDT 2024. Contains 374191 sequences. (Running on oeis4.)