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?
LINKS
Rémy Sigrist, C program
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
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Mar 25 2022
STATUS
approved