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.
%I A127064 #22 Nov 25 2024 04:59:24 %S A127064 1,2,3,4,5,3,3,5,5,4,5,5,3,4,3,4,4,6,6,6,6,6,5,4,7,6,5,6,5,6,5,5,5,4, %T A127064 5,5,6,5,6,6,5,5,5,7,7,7,5,5,6,6,7,7,6,7,6,6,7,6,7,6,6,7,8,7,7,8,8,8, %U A127064 9,4,5,5,6,4,5,6,5,6,6,4,5,4,6,5,5,4,5,4,7,5,5,4,7,6,7,8,5,8,6,6,6,6,6,7,7 %N A127064 a(0)=1. a(n) = a(prime(n)(mod n)) + 1, where prime(n) is the n-th prime. %H A127064 Robert Israel, <a href="/A127064/b127064.txt">Table of n, a(n) for n = 0..10000</a> %e A127064 The 7th prime, 17, is congruent to 3 (mod 7). So a(7) = a(3) + 1 = 4 + 1 = 5. %p A127064 a[0]:=1: for n from 1 to 125 do a[n]:=1+a[ithprime(n) mod n] od: seq(a[n],n=0..125); # _Emeric Deutsch_, Mar 25 2007 %t A127064 f[l_List] := Block[{n = Length[l]},Append[l, l[[Mod[Prime[n], n] + 1]] + 1]];Nest[f, {1}, 105] (* _Ray Chandler_, Mar 25 2007 *) %o A127064 (PARI) a(n)={k=1;if(n>0,k=a(prime(n)%n)+1);k;} \\ _Jinyuan Wang_, Feb 01 2019 %Y A127064 Cf. A004648, A127066. %K A127064 nonn %O A127064 0,2 %A A127064 _Leroy Quet_, Mar 21 2007 %E A127064 Extended by _Ray Chandler_ and _Emeric Deutsch_, Mar 25 2007