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 A348667 #17 Nov 23 2021 10:36:35 %S A348667 2,2,3,19,4,16,7,5,84,467,21,6,51,134,37,75,7,81,113,16,74,403,8,52, %T A348667 12,125,25,163,318,9,305,31,53,17,169,14,60,10,66,36,3500,15,22,19,42, %U A348667 38,11,34,113,48,130,208,994,1033,468,17,12,53,307,623,45,173,48 %N A348667 a(n) is the index of the first 0 term in the following sequence: X(1)=1, X(i+1) = (X(i)+i) mod (n+i). a(n)=-1 if there are no zeros in the X sequence. %C A348667 Conjecture: a(n) > 0. %C A348667 Note that some terms are unexpectedly large, for example a(1059) = 62573802. %t A348667 a[n_] := Module[{x, k = 1}, x[1] = 1; x[j_] := x[j] = Mod[x[j - 1] + j - 1, n + j - 1]; While[x[k] != 0, k++]; k]; Array[a, 63, 0] (* _Amiram Eldar_, Oct 29 2021 *) %o A348667 (Python) %o A348667 for n in range(1060): %o A348667 i = x = 1 %o A348667 while x: %o A348667 x = (x+i) % (n+i) %o A348667 i += 1 %o A348667 print(i, end=', ') %o A348667 (PARI) a(n) = my(x=1, i=1); while(x, x = (x+i) % (n+i); i++); i; \\ _Michel Marcus_, Oct 29 2021 %Y A348667 Cf. A177356. %K A348667 nonn %O A348667 0,1 %A A348667 _Alex Ratushnyak_, Oct 28 2021