A022290(n) = my (v=0, e); while (n, n-=2^e=valuation(n,2); v+=fibonacci(2+e)); v nb = vector(fibonacci(2+N=14)-1) for (m=1, 2^N, v=A022290(m); if (v<=#nb, nb[v]++)) vv = vector(#nb, n, vector(nb[n])) kk = vector(#nb) for (m=1, 2^N, v=A022290(m); if (v<=#nb, vv[v][kk[v]++]=m)) { a = vector(vecsum(nb)); for (n=1, #vv, for (k=1, #vv[n], a[vv[n][k]] = vv[n][#vv[n]+1-k]; ) ); print ("0 0"); for (n=1, #a, print (n " " a[n]); ); } quit