cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A343334 a(1) = 0; thereafter a(n+1) = abs(a(n)-y), where y is the number of numbers m < n such that a(m) = a(n).

This page as a plain text file.
%I A343334 #10 Apr 15 2021 15:44:31
%S A343334 0,0,1,1,0,2,2,1,1,2,0,3,3,2,1,3,1,4,4,3,0,4,2,2,3,1,5,5,4,1,6,6,5,3,
%T A343334 2,4,0,5,2,5,1,7,7,6,4,1,8,8,7,5,0,6,3,3,4,2,6,2,7,4,3,5,1,9,9,8,6,1,
%U A343334 10,10,9,7,3,6,0,7,2,8,5,2,9,6,1,11,11
%N A343334 a(1) = 0; thereafter a(n+1) = abs(a(n)-y), where y is the number of numbers m < n such that a(m) = a(n).
%C A343334 Variant of A340488, with XOR(a,y) replaced by abs(a-y).
%C A343334 Every number appears, and their first occurrences are in increasing order.
%C A343334 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.
%H A343334 Pontus von Brömssen, <a href="/A343334/b343334.txt">Table of n, a(n) for n = 1..10000</a>
%o A343334 (Python)
%o A343334 def A343334_list(n_max):
%o A343334   a=0
%o A343334   a_list=[0]
%o A343334   count=[]
%o A343334   for i in range(n_max-1):
%o A343334     if a==len(count): count.append(0)
%o A343334     else: count[a]+=1
%o A343334     a=abs(a-count[a])
%o A343334     a_list.append(a)
%o A343334   return a_list
%Y A343334 Cf. A340488, A343332, A343333.
%K A343334 nonn,look
%O A343334 1,6
%A A343334 _Pontus von Brömssen_, Apr 12 2021