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”).

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

%I #9 Mar 29 2022 16:39:06

%S 0,5,6,42,8,69,42,92,252,159,120,164,462,472,305,713,118,2073,495,99,

%T 172,419,2189,305,518,970,601,1174,1007,1209,6202,331,2928,499,2118,

%U 416,3621,3921,302,3042,50,25744,5079,1882,5535,2216,1492,4845,274,889,1571

%N 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.

%C 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.

%C Note that in general, E_n(k) <> A181391(k) mod n.

%C For n <= 10000:

%C - E_n is always eventually periodic,

%C - except for n = 1, 3 and 4, E_n is eventually constant (with value 1).

%C Is E_n eventually periodic for all n?

%H Rémy Sigrist, <a href="/A352641/a352641.txt">C program</a>

%e For n = 3:

%e - E_3 is eventually 7-periodic:

%e 0 0 1 0 2 0 (2 2 1 0 1 2 1)*

%e - the transient part has 6 terms,

%e - so a(3) = 6.

%o (C) See Links section.

%Y Cf. A181391.

%K nonn

%O 1,2

%A _Rémy Sigrist_, Mar 25 2022