OFFSET
1,1
COMMENTS
A van Eck sequence is defined recursively by a(n+1) = min { k > 0 | a(n-k) = a(n) } or 0 if this set is empty, i.e., a(n) does not appear earlier in the sequence. - M. F. Hasler, Jun 15 2019
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10001
PROG
(Python)
A171915_list, l = [5, 0], 0
for n in range(1, 10**4):
for m in range(n-1, -1, -1):
if A171915_list[m] == l:
l = n-m
break
else:
l = 0
A171915_list.append(l) # Chai Wah Wu, Jan 02 2015
(PARI) A171915_vec(N, a=5, i=Map())={vector(N, n, a=if(n>1, iferr(n-mapget(i, a), E, 0)+mapput(i, a, n), a))} \\ M. F. Hasler, Jun 15 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 22 2010
EXTENSIONS
Name and other sections edited by M. F. Hasler, Jun 15 2019
STATUS
approved