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.

A365159 a(n)=n for n<=3, and thereafter, a(n) is the number of locations 1..n-1 which cannot be reached starting from i=n-1, where jumps from location i to i +- a(i) are permitted (within 1..n-1). See example.

This page as a plain text file.
%I A365159 #24 Sep 10 2023 09:47:22
%S A365159 1,2,3,2,2,3,4,4,3,6,4,6,8,5,9,10,11,12,13,13,11,11,13,13,15,15,16,17,
%T A365159 18,19,20,20,21,22,23,24,25,26,26,18,26,29,20,23,24,25,26,27,28,29,29,
%U A365159 28,31,29,28,29,30,31,32,33,34,34,38,27,39,40,41,42,42
%N A365159 a(n)=n for n<=3, and thereafter, a(n) is the number of locations 1..n-1 which cannot be reached starting from i=n-1, where jumps from location i to i +- a(i) are permitted (within 1..n-1). See example.
%H A365159 Neal Gersh Tolunsky, <a href="/A365159/b365159.txt">Table of n, a(n) for n = 1..10000</a>
%e A365159 a(9)=3 because there are 3 locations that cannot be reached starting from i=n-1=8, where a(8)=4. We start by finding the locations that can be reached (each line shows the next unvisited location(s) we can reach from the term(s) in the previous iteration):
%e A365159 1, 2, 3, 2, 2, 3, 4, 4
%e A365159          2<----------4
%e A365159 1, 2, 3, 2, 2, 3, 4, 4
%e A365159    2<----2---->3
%e A365159 1, 2, 3, 2, 2, 3, 4, 4
%e A365159       3<-------3
%e A365159 We visited 5 locations (i = 2, 3, 4, 6, and 8) and can visit no more:
%e A365159 1, 2, 3, 2, 2, 3, 4, 4
%e A365159    2  3  2     3     4
%e A365159 This leaves a total of 3 locations that could not be reached (i = 1, 5, and 7) from i=8, so a(9)=3.
%Y A365159 Cf. A360746.
%K A365159 nonn
%O A365159 1,2
%A A365159 _Neal Gersh Tolunsky_, Aug 23 2023