OFFSET
0,4
LINKS
John Tyler Rascoe, Table of n, a(n) for n = 0..10000
EXAMPLE
8 = 2^3 + 0; so for a(8) we want the number of terms among terms a(1), a(2),... a(7) which equal a(0) = 0. So a(8) = 1.
PROG
(PARI) A119803(mmax)= { local(a, ncopr); a=[0]; for(m=0, mmax, for(k=0, 2^m-1, ncopr=0; for(i=1, 2^m+k, if( a[i]==a[k+1], ncopr++; ); ); a=concat(a, ncopr); ); ); return(a); }
{ print(A119803(6)); } \\ R. J. Mathar, May 30 2006
(Python)
from collections import Counter
def A119803_list(max_n):
A, C = [0], Counter()
for n in range(1, max_n+1):
C.update({A[-1]})
A.append(C[A[int('0'+bin(n)[3:], 2)]])
return(A) # John Tyler Rascoe, Nov 07 2023
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, May 24 2006
EXTENSIONS
More terms from R. J. Mathar, May 30 2006
STATUS
approved