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!)
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. 0
2, 2, 3, 19, 4, 16, 7, 5, 84, 467, 21, 6, 51, 134, 37, 75, 7, 81, 113, 16, 74, 403, 8, 52, 12, 125, 25, 163, 318, 9, 305, 31, 53, 17, 169, 14, 60, 10, 66, 36, 3500, 15, 22, 19, 42, 38, 11, 34, 113, 48, 130, 208, 994, 1033, 468, 17, 12, 53, 307, 623, 45, 173, 48 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Conjecture: a(n) > 0.
Note that some terms are unexpectedly large, for example a(1059) = 62573802.
LINKS
MATHEMATICA
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 *)
PROG
(Python)
for n in range(1060):
i = x = 1
while x:
x = (x+i) % (n+i)
i += 1
print(i, end=', ')
(PARI) a(n) = my(x=1, i=1); while(x, x = (x+i) % (n+i); i++); i; \\ Michel Marcus, Oct 29 2021
CROSSREFS
Cf. A177356.
Sequence in context: A101817 A058159 A058157 * A230504 A265806 A049132
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Oct 28 2021
STATUS
approved

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 April 19 16:52 EDT 2024. Contains 371794 sequences. (Running on oeis4.)