OFFSET
1,6
COMMENTS
Variant of A340488, with XOR(a,y) replaced by abs(a-y).
Every number appears, and their first occurrences are in increasing order.
Let N_k(n) denote the number of occurrences of k among the first n terms. It appears that N_0(n) ~ sqrt(n/2) and N_k(n) ~ sqrt(2*n) for k > 0.
LINKS
Pontus von Brömssen, Table of n, a(n) for n = 1..10000
PROG
(Python)
def A343334_list(n_max):
a=0
a_list=[0]
count=[]
for i in range(n_max-1):
if a==len(count): count.append(0)
else: count[a]+=1
a=abs(a-count[a])
a_list.append(a)
return a_list
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Pontus von Brömssen, Apr 12 2021
STATUS
approved