login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A352641
For any n > 0, let E_n be the variant of Van Eck's sequence where values are taken mod n; if E_n is eventually periodic, then a(n) is the length of its transient part; otherwise a(n) = -1.
1
0, 5, 6, 42, 8, 69, 42, 92, 252, 159, 120, 164, 462, 472, 305, 713, 118, 2073, 495, 99, 172, 419, 2189, 305, 518, 970, 601, 1174, 1007, 1209, 6202, 331, 2928, 499, 2118, 416, 3621, 3921, 302, 3042, 50, 25744, 5079, 1882, 5535, 2216, 1492, 4845, 274, 889, 1571
OFFSET
1,2
COMMENTS
For any n > 0: E_n(1) = 0, and for any k > 0, if E_n(m) = E_n(k) for some m < k, take the largest such m and set E_n(k+1) = (k-m) mod n; otherwise E_n(k+1) = 0.
Note that in general, E_n(k) <> A181391(k) mod n.
For n <= 10000:
- E_n is always eventually periodic,
- except for n = 1, 3 and 4, E_n is eventually constant (with value 1).
Is E_n eventually periodic for all n?
EXAMPLE
For n = 3:
- E_3 is eventually 7-periodic:
0 0 1 0 2 0 (2 2 1 0 1 2 1)*
- the transient part has 6 terms,
- so a(3) = 6.
PROG
(C) See Links section.
CROSSREFS
Cf. A181391.
Sequence in context: A378902 A262308 A355137 * A299168 A219516 A273050
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Mar 25 2022
STATUS
approved